[ragel-users] Re: Ruby and Java code generation
Ola Bini
ola.b... at gmail.com
Sun Sep 30 12:26:06 UTC 2007
Wincent Colaiuta wrote:
> El 28/9/2007, a las 22:04, Adrian Thurston escribió:
>
>
>> Before loop breaks and variables were used in Ruby code call/cc
>> features
>> were used. This was found to be very slow (about 10 times slower than
>> the current). Do you think throw/catch would be any better than
>> call/cc?
>>
>
> Yes, if for no other reason than the fact that Ruby 1.9 won't have
> call/cc...
>
> Cheers,
> Wincent
>
Throw/catch will perform much better - the speed of call/cc is due to
saving and restoring the stack each time you use it - this won't happen
with throw/catch.
But you're wrong about 1.9. Matz and Koichi added continuations again a
month or two back.
Cheers
--
Ola Bini (http://ola-bini.blogspot.com)
JRuby Core Developer
Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
Practical JRuby on Rails (http://apress.com/book/view/9781590598818)
"Yields falsehood when quined" yields falsehood when quined.
More information about the ragel-users
mailing list