From: Robert Klemme Date: 2004-08-26T23:55:36+09:00 Subject: Re: is the ruby interpreter stackless? "Lennon Day-Reynolds" schrieb im Newsbeitrag news:5d4c6124040824184528f7801c@mail.gmail.com... > Ruby uses the C stack; its continuations are implemented using > setjmp/longjmp. That makes the Ruby API very natural to use from C, > but unfortunately, also means that the stack limits of the native > platform apply, and that Ruby's continuations are no faster than full > native SMP threads. Is that really the case? I mean, this doesn't look like "natural" stack depth limit: $ ruby -e 'def foo() foo end; begin; foo; rescue Exception => e; puts e.backtrace.size; end' 13633 Or does each single call use up so much stack space? I did a simple recursive function in C and it didn't core prior to level 129536. So basically that would mean that Ruby uses 10 times the stack space per invocation. Kind regards robert