4fa88fcbde
For JRuby this has little to no benefits as it uses strings for method names. However, both MRI and Rubinius will perform a Symbol lookup whenever rb_intern() is called. By doing this once for all callback names and caching the resulting VALUE objects the lexer timings can be reduced by about 25%. In case of the benchmark benchmark/xml/lexer/string_average_bench.rb this means it runs in around 500ms instead of 700ms. |
||
---|---|---|
.. | ||
extconf.rb | ||
lexer.h | ||
lexer.rl | ||
liboga.c | ||
liboga.h |