[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some comments relating to ICFP contest

This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 contain all messages, not just those from before July 7th, 2015.

On 7/26/06, Andre van Tonder <andre@xxxxxxxxxxxxxxxxx> wrote:
I have a few comments based on my experience in trying to implement the
ICFP contest virtual machine specification using Scheme.  I found that most
Schemes were pretty much useless for this particular application

I also participated in the contest, and started with Scheme but ended
up using C (the VM was much shorter and easier to express in C, apart
from being faster).

After the contest I tweaked my Scheme implementation, and when
compiled with Chicken Scheme it was only 10x slower than C, using only
R5RS and SRFIs 4 and 60.  This was mostly thanks to using a 64-bit
machine where I could do 32-bit arithmetic by masking out the high
bits after each numeric operation: (bitwise-and #xFFFFFFFF expr).  On
a 32-bit machine almost every value would have been a bignum, totally
destroying performance.

This seems much more common and convenient than the aribtrary
(and variable among different implementations) modulo arithmetic
provided by the `fixnum' procedures of SRFI-77.