From: Joel VanderWerf Date: 2002-12-14T18:12:21+09:00 Subject: Re: Ruby slow?? Josh Huber wrote: > Chris Thomas 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 > But callcc is implemented in terms of threads...