Versus the same run in GNU clisp with the Shootout's SBCL code:
> (time (spigot 1000))
[OUTPUT ELIDED]
Real time: 1.022299 sec.
Run time: 0.888055 sec.
Space: 104310256 Bytes
GC: 133, GC time: 0.420025 sec.
NIL
Their outputs were the same, so the Arc program seems to be working (to say nothing of its optimality; I basically did a straight port). This benchmark's fun if only because you get to watch pi being calculated before your eyes. Nifty algorithm.
This is an awesome reference, thanks. I'll be using a few of these. The pi calculation uncovered a rainbow weakness: rainbow relies on java "long" integers for 'int types; but these are 64-bit signed integers and the algorithm fails at the 5th digit. So I'll need to think of a way to incorporate arbitrary-precision maths before I can run this benchmark. One thing is certain: using java's BigXXX family of numeric types is going to hurt.