Re:ClojureScript and optimized C [video]
by mpweiher on Monday November 28, 2016 @02:03PM
(#13057572)
I think the problem is that it's using doubles, which JavaScript VMs feel free to optimise to ints. If I change the C code to long, I get the following:
The original:
That's a factor 266989 difference, if anyone cares :)
[ Parent
| on HN ]
Re:ClojureScript and optimized C [video]
by jjnoakes on Monday November 28, 2016 @02:35PM
(#13057773)
Can you post your code, compiler, and the disassembly from main()? The only way I believe these numbers is if your compiler optimized the loop away to a constant.