[ragel-users] Improving perf of the Java code
Charles Oliver Nutter
headius at headius.com
Wed Dec 21 06:30:43 UTC 2011
I work on JRuby, the Ruby implementation for the JVM. As you may know,
Ruby users have latched on to Ragel for a number of parser tasks, such
as json, http, various markup languages, and so on.
I have spent the last day trying to optimize a Ragel-generated json
parser used as an extension to JRuby, and despite my best efforts I
can't get it more than about 2x slower than the version for C Ruby.
This is especially poor considering the Ruby code that surrounds it
should run significantly faster on JRuby, and it still doesn't make up
I'm wondering what, if anything, can be done to improve the
performance of the generated Java code. I notice that Java is only
supported in the simplest output form, presumably because of the lack
of "goto". I'm interested in exploring options to bring the Java code
up to par with the generated code for other languages, perhaps by
implementing it using raw JVM bytecode (using some assembly-like
format like BiteScript or Jasmin) or by post-processing the compiled
result to insert true gotos.
Any pointers on this? Any prior work or tips?
ragel-users mailing list
ragel-users at complang.org
More information about the ragel-users