Category Archives: C++

Job System and ParallelFor

Some time ago, while profiling our game, I noticed that we have a lot of thread locking and contention resulting from a single mutexed MPMC job queue processing a large amount of tiny jobs. It wasn’t possible to merge work … Continue reading

Posted in C++, Multithreading | 2 Comments

Visual C++ linker timestamp

Nice trick to get build’s timestamp¬†at runtime (Visual C++ only): It’s not very portable, but it doesn’t require any additional recompilation (as __DATE__ __TIME__ macros do).

Posted in C++ | 1 Comment

PixelJunk Eden data extractor

Recently Q-Games ported one of their games – PixelJunk Eden to Windows. Actually it’s their first Windows release. From tech perspective it’s not as impressive as PixelJunk Shooter series, but still it was quite interesting to poke around this game’s … Continue reading

Posted in C++ | Leave a comment

VC++ and multiple inheritance

Today at work we were optimizing memory usage. At some moment we found out that size (on stack) of our basic data structures is x bytes bigger than summed size of their members. Every basic data structure was written following … Continue reading

Posted in C++ | 4 Comments

C++ compiler VS human

There is a very nice article about writing fast math library on gamasutra. It shows for example that using operator overloading generates slower code than when using functions.¬†A lot of people believe that compiler will generate better code than a … Continue reading

Posted in C++ | Leave a comment