
20 Feb
2009
20 Feb
'09
10:15 a.m.
Hello Dan, Friday, February 20, 2009, 5:39:25 PM, you wrote:
Not that I'd be sad if GHC could reduce that whole constant at compile time, but GCC isn't doing 1 billion adds in 6 (or even 60) milliseconds.
yes, that's what was done actually: 22 0020 8D44D01C leal 28(%eax,%edx,8), %eax 23 0024 83C208 addl $8, %edx so, i rechecked with multiplies: mult.hs 12.667 mult-fast.hs 2.512 mult.cpp 0.938 and xors: mult.hs 12.605 mult-fast.hs 1.856 xor.cpp 0.339 -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com