parsing (much) slower under jruby?

85 views
Skip to first unread message

Paul Madden

unread,
Apr 16, 2013, 11:56:13 AM4/16/13
to treet...@googlegroups.com
Hi all.

First off, thank you very much for Treetop: It's a great tool and I love working with it. FWIW, and if it's useful to anyone, I have a Treetop mode for emacs here: https://github.com/maddenp/treetop-mode.el

Does anyone have a ready idea as to why parsing should be much slower under JRuby than MRI? For example, a parse that takes 0.15s under MRI takes 2.44s under JRuby. This is independent of JVM/JRuby start-up time, as I'm using a simple client/server arrangement that requires only a single start-up. Cursory profiling indicates that the time is eaten up in the parser proper rather than in the (fairly substantial) support code around it, but I do use semantic predicates a lot, so I could be doing something there that chokes JRuby but not MRI. I'm not sure yet what that could be, though.

I did notice the "Treetop using extend() constantly breaks optimising Rubies" thread and wonder if it might be related, but don't understand the issue well enough to judge.

Any ideas are appreciated, thanks!

Paul Madden

unread,
May 15, 2013, 10:08:36 AM5/15/13
to treet...@googlegroups.com
In case somebody runs into this searching: Yes, the 'extend' issue seems to be responsible for the JRuby slowdown.See this thread.
Reply all
Reply to author
Forward
0 new messages