Hi folks,

Last night I worked on a submission for the 'ring' benchmark in the Shootout:

http://shootout.alioth.debian.org/sandbox/benchmark.php?test=threadring&lang=all

After a couple different approaches, the one that worked best by far
was to use the 'mailbox' egg, which we cannot do in the Shootout,
since it's not part of the core. So, I stripped down the mailbox to
its essentials (w.r.t. this program), and included it. It adds an
extra 80 lines to the program size, but it's a better representation
of what Chicken can do, IMO.

On my laptop, I can run N=1e7 in about 33 seconds, compared to about
47 seconds for the Python version (though I am possibly running an
older Python?). I can't speak for the Shootout machines, but this
might put Chicken roughly in the category of the GNU gcc program.

Code is attached; comments are welcome.

Graham

Attachment: ring.tgz
Description: GNU Zip compressed data

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to