Ragel success story
Wincent Colaiuta
w... at wincent.com
Tue Feb 5 01:13:49 UTC 2008
On 5 feb, 01:56, Adrian Thurston <thurs... at cs.queensu.ca> wrote:
>
> 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
Excellent suggestion. Tokenizing times without -G2:
user system total real
short slab of ASCII text 0.780000 0.000000 0.780000
( 0.777619)
short slab of UTF-8 text 1.200000 0.000000 1.200000
( 1.202833)
longer slab of ASCII text 12.710000 0.000000 12.710000
( 12.747387)
longer slab of UTF-8 text 18.650000 0.020000 18.670000
( 19.015087)
So those numbers are about 10 times faster than ANTLR.
And now with -G2:
user system total real
short slab of ASCII text 0.180000 0.000000 0.180000
( 0.182539)
short slab of UTF-8 text 0.320000 0.000000 0.320000
( 0.330065)
longer slab of ASCII text 2.740000 0.000000 2.740000
( 2.792006)
longer slab of UTF-8 text 5.000000 0.000000 5.000000
( 5.072432)
Here are the ANTLR numbers again for comparison:
user system total real
short slab of ASCII text 9.400000 1.870000 11.270000
( 11.308913)
short slab of UTF-8 text 8.620000 1.880000 10.500000
( 10.551956)
longer slab of ASCII text 132.380000 19.690000 152.070000
(153.296844)
longer slab of UTF-8 text 116.280000 19.510000 135.790000
(136.788652)
So with -G2 Ragel is nearly 38 times faster than ANTLR's fastest
target! I'm really struggling to believe how good the results are.
I'll update my article shortly with the new figures.
Thanks very much for building such an awesome project.
Cheers,
Wincent
More information about the ragel-users
mailing list