Chris Thomas <chris / m-audio.com> writes:

> It's interesting that the fastest implementations listed on that
> shootout page are also non-native.

Well, yeah, but they (at least the fastest one) use coroutines, which
are very lightweight, and require (essentially) no scheduling
overhead.  Basically, they explicitly pass control between eachother
at certain points.

You could implement coroutines in ruby with callcc and get much better
performance for this benchmark, I suspect.

A little searching turns up this coroutine module.  I haven't tried
it, but it looks pretty straightforward:

http://liber.sourceforge.net/coroutines.rb

-- 
Josh Huber