[Haskell-cafe] speed: ghc vs gcc
Bulat Ziganshin
bulat.ziganshin at gmail.com
Fri Feb 20 10:15:01 EST 2009
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 at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xor.hs
Type: application/octet-stream
Size: 76 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090220/826069a7/xor.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xor-fast.hs
Type: application/octet-stream
Size: 132 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090220/826069a7/xor-fast.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xor.cpp
Type: application/octet-stream
Size: 132 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090220/826069a7/xor-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mult.cpp
Type: application/octet-stream
Size: 132 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090220/826069a7/mult.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mult.hs
Type: application/octet-stream
Size: 37 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090220/826069a7/mult-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mult-fast.hs
Type: application/octet-stream
Size: 108 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090220/826069a7/mult-fast.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sum-fast.hs
Type: application/octet-stream
Size: 108 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090220/826069a7/sum-fast.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sum.cpp
Type: application/octet-stream
Size: 118 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090220/826069a7/sum.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sum.hs
Type: application/octet-stream
Size: 32 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090220/826069a7/sum-0001.obj
More information about the Haskell-Cafe
mailing list