Back with a post after 6 years of silence. If you had to parse a microsecond-resolution epoch timestamp as quickly as possible, how would you do it? We’ll take a look at using compiler intrinsics to do it in log(n) time.
26 May 2020
26 May 2020
Back with a post after 6 years of silence. If you had to parse a microsecond-resolution epoch timestamp as quickly as possible, how would you do it? We’ll take a look at using compiler intrinsics to do it in log(n) time.
16 Jun 2014
During the past two Toronto VR Meetups I have presented talks about Virtual Reality. The slides are now available online here and here.
23 Nov 2013
In this article, I will try to explain move semantics in C++11 using a more pragmatic approach, by answering specific questions developers may ask. We’ll start with why moves are needed in the first place, then see how to use them, and eventually move onto common misconceptions and pitfalls.
06 Oct 2013
The future is here! I recently got my hands on a pair of the awesome Oculus Rift VR goggles, and I am extremely excited. While the demo software is impressive out of the box, a lot of factors must come together to create a compelling experience. In this post I will discuss the mechanisms behind the sense of scale in VR, highlight its importance and propose new ways to explore this effect.
19 Dec 2012
In Part 1, the “value of rvalues” was discussed, as well as their use in the context of std::async
. A problem was observed with how lvalues are handled, so in this part I will introduce perfect forwarding to deal with rvalues and lvalues generically and try to provide an optimal approach in that context.
18 Dec 2012
Perfect forwarding allows template functions to forward the arguments “as is” to any other function they call. This helps minimize the number of unnecessary copies and conversions when delegating information to other functions. In a quest to get rid of copying completely in a library I was writing, I came across the problem of perfect forwarding to functions launched on a separate thread.
08 Oct 2012
Very rarely, a case comes up where a new function is required even if it is functionally identical to another one. In these cases another meaning is attached to these functions beyond their interface, and machine instructions; reusing it will actually be counterproductive. We examine such a case I encountered at my workplace.
31 Aug 2012
Last time I explained how plain C++ objects and their methods interact with threads. This time around, we will look at QObjects
, and their “thread affinity”.
21 Aug 2012
When I first started working on a team using Qt (in a C++ environment), I would hear co-workers talk about “objects being on threads”, and then immediately talk about how several threads are accessing the same object. These two seemingly opposite ideas confused me at first. Let’s untagle the mystery!