Hacker News new | ask | show | jobs
by jasonjmcghee 826 days ago
Seems crazy to me that double would produce that kind of speed up. Is float getting emulated somehow? Don't they end up the same size?
1 comments

> Don't they end up the same size?

No. Float is half the size of double.

My intuition would have been that floats were faster because of this. Less memory to iterate through.
it is faster in just about every way. less memory, even the cpu instructions (which are usually not the problem) are faster. there's something fucky going on with code gen here. or it could also simply be the measurement procedure that is doing something weird like working with not properly cold or equally warmed up data or instruction caches.