Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


> 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.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: