[racket] Racket 5.3.4, 32-bit slow?

From: Danny Yoo (dyoo at hashcollision.org)
Date: Tue Jun 4 15:59:17 EDT 2013

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:


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

The sum you're accumulating altogether is:


which is an integer that's much bigger than natively representable with 32
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130604/f4ee5af7/attachment.html>

Posted on the users mailing list.