Great patch! From my quick tests I got about 35% performance increase.
Ah, it needs a little tweak to work on windows, as 'long long' is defined
as
__int64 (probably we could do a typedef once for all, as there are already
many #ifdefs in the code because of this).
Did it not work for you as-is on Windows...? It did for me, since it seems
there's already a typedef for __int64 -> long long. I'd wondered the same,
but before I added the (double) cast in case of overflow, I got the
"Conversion from *__int64* to double: possible loss of precision" warning.
:-)
I haven't tried the patch on windows, I was just guessing. But Edin's mail explains why it worked for you (we use VC 6 for official builds).
Nuno