[racket] Racket 5.3.4, 32-bit slow?
Some of the involved numbers are bigger than can be represented in 32 bits.
Therefore, the computation on 32 bit platforms will need to use more
software-emulated bigintegers to perform the computation successfully, and
that's where the performance difference is coming from.
I played with this by rewriting the code in another language, Go, just out
of curiosity:
https://gist.github.com/dyoo/5708928
If we switch out the representation from int64 to int32, for example, we'll
see that the result is wrong. So it's very much a data representation
issue.
The sum you're accumulating altogether is:
15981747679237090
which is an integer that's much bigger than natively representable with 32
bits.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130604/f4ee5af7/attachment.html>