On Sat, Sep 27, 2008 at 4:20 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
Hi Felix. I did not mean to drag you into this discussion. I know performance benchmarking is one of your buttons that is best left untouched!
I'm happy to have taken my little part in it.
All of this started with this message on the Gambit mailing list about the performance claim that call/cc in Chicken was "free" because of Cheney on the MTA and that Gambit used the same approach:
On 24-Sep-08, at 11:14 AM, Per Eckerdal wrote:
Chicken. Cheney on the MTA gives you call/cc essentially for free - it's just as fast as any other function call.
I was under the impression that Gambit also did this.. Am I wrong?
/Per
My response was that Gambit's continuations are based on a completely different approach which gives just as good performance, using the ctak and fibc benchmarks as simple evidence. A complete analysis of the two approaches would take a lot of effort, which is why I used these benchmarks as a quick-and-dirty way to evaluate the performance (it turns out that ctak is much better than fibc as a benchmark for call/cc because fibc does many other things than just call/cc, i.e. it measures other optimizations of the compiler).
Right, but aren't all benchmarks just quick-and-dirty? (hopefully quick, of course).
Note that in chicken the continuations that the Scheme programmer sees are not the real ones: they are wrapped in a closure and must perform extra work checking dynamic-wind thunks. There are some internal procedures (##sys#call-with-direct-continuation and ##sys#direct-return) which are really cost-free, as they use directly the implicit continuations that are created in the compilation processs.
Let me reiterate that I'm not trying to compare Gambit and Chicken as systems. If that was the case I would have much more to say and obviously would conclude that Gambit is better ;-)
Of course.
cheers, felix