[ragel-users] Ragel success story
thurs... at cs.queensu.ca
Tue Feb 5 00:56:27 UTC 2008
Nice writeup! Thanks for sharing your experience.
It seems from the Rakefile that you're using the default output code
style. If speed is what you're after you should try the -G2 option :D
Wincent Colaiuta wrote:
> Here's a little Ragel success story.
> I've written a wikitext-to-HTML translator written in C (a Ruby
> extension) and up until a few days ago it was using a lexer generated
> by ANTLR 3.0.1 (the C target). I've had a suspicion for some time,
> however, that a Ragel scanner might be faster for a number of reasons.
> Imagine my surprise when I compared the speed and found that Ragel was
> nearly 10 times faster! I hadn't been expecting that kind of
> You can look at the code here:
> And an article with the benchmark results is here:
> For comparison, the current version of the ANTLR grammar at the time
> of writing is:
> And the corresponding Ragel scanner implementation is:
> I've made no attempt at optimization yet, but the performance of the
> Ragel scanner is already spectacular for a "rough draft".
> Ragel is a wonderful tool!
More information about the ragel-users