About me

I have quite recently learnt things about floating point math, or, to be clear, about IEEE 754.

So, I thought I knew most things about them. And then sadly I read way too many bad sources and got quite confused (some good as well!).
To get to the bottom of it, I did what I always do; try it out myself. Debug it!!

This is in the specific context of game development. So, fast, and perhaps not extremly precise?
Also x86/x64 specific. And I only know the options name/existance in VS2015.

Haven't updated in a long time.
Mostly busy with work. ( Vermintide PC version released in October 2015. Console versions being worked on. )

I'm really liking Visual Studio 2015. Even if it made one of my previous post on using clang in Visual Studio superfluous.
And now with that, all the C++ features are available! Normal Microsoft compiler has come a long way, but there are still a few things missing.
Not that I use a lot myself. The newest feature I use is variadic templates. My logging class doesn't have macros anymore, and it is typesafe!

I plan to actually do some proper coding very soon.
Not just tiny examples to help relieve my curiosity for new features and such. :)

Short story: I did some profiling (I do a lot of profiling) and QueryPerformanceCounter showed up a lot more than..I felt it should. So, some reading up and testing later, I am now using rdtsc/rdtscp.

Longer story: A long time ago, before computers had more than one core, and if the CPU supported it, the fastest way to time things where by using the rdtsc instruction. The granularity you got was a lot higher than any other kind of timing instruction available at the time. Partly because it wasn't really a timing instruction; it returned instructions executed since boot-up.

The problems:

If a CPU changes speed, the rate of instructions per second was not constant; hard to use for timing.

I am using Windows though, with Visual Studio (2012 usually), and, this makes the C++11 part hard. Don't get me wrong, Visual Studio has gotten a lot better at following the C++ standard. And it gets "new features" faster than ever before. But it is still too bad and to slow. They did fix some issues by releasing an update (CTP - Community Technology Preview) to the C++ compiler for VS2012 that you can download here: (http://blogs.msdn.com/b/vcblog/archive/2012/11/02/visual-c-c-11-and-the-future-of-c.aspx) This made my dabbles into Variadic Templates work. And a few other things work..better. But I really want to be able to use things like override, = delete etc. No luck for that.

VS2013 has better C++ support, and I'm quite sure 2015 has even better support; I have not tried yet. Not good enough though.