[racket] Racket 5.3.4, 32-bit slow?

From: Joe Gilray (jgilray at gmail.com)
Date: Tue Jun 4 17:47:09 EDT 2013

Hi Danny,

Yes, makes perfect sense, hmmm... there's probably a way to avoid so many
sqrt calls.

How do you like Go?  How is the performance on this code?


On Tue, Jun 4, 2013 at 12:59 PM, Danny Yoo <dyoo at hashcollision.org> wrote:

> 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/93612433/attachment.html>

Posted on the users mailing list.