Compile Time Hashes in C - Revisied

Hashing strings in c++ at compile time has been possible since c++11 but is it worth doing? Me and a few colleagues was discussed this over a few beers and it reminded me that I have already written about it here (8 years ago… ARGH I’m getting old!).

But a lot of time has passed since I wrote that… and I didn’t make any measurements in that article! shame! SHAME I SAY!

Read More

Looking at c for better closures in c++

Note: before we begin, finding a name for this post was really hard!

In this post I’m going to touch on a c++-technique to handle callbacks that I have not seen written about before and that many of my colleagues hadn’t seen before either. Probably it’s not something new and some of you will probably just say “yeah yeah, nothing new under the sun” but it’s probably worth a few words!

Read More

Swapping memory and compiler optimizations

During my vacation for the holidays I thought that maybe I wanted some smaller project that you could fit in together with “family life” (not the easiest of endeavour!) and I got to think about some old code that I had laying about in my own little game-engine that I have thought about making public for a while. I thought it might be useful for someone else and maybe just doing some optimization work on it might be a fun little distraction!

Read More