feed

May  27  Better news by Chris Poirier • in Announcementspermalink

0.25 seconds.  Yay!

Last night I moved the lexical processing out of the main parser and into a mini parser of its own.  It still works the same way, but dispenses with the main parser’s overhead.  I still have some loose ends to tie up, but that alone pulled the test run from 1.37 seconds down to 0.92 seconds.

I found another 0.7 seconds in the character map lookup used to find actions during lexing.  Building the faster data structure adds about 0.4 seconds to the generation run, but knocks the runtime parse down to 0.25 seconds for the example grammar. 

And, to be clear, that’s for an interpreted grammar, using an interpreter written in Ruby.  The good news is that I think the code generation layer can improve on that quite a bit more.  :-)  And while I doubt RCC parsers will ever win races against other parsers, I think they can be convinced to turn out a respectable performance.

It’s official: the integrated lexer is here to stay.

Related Links

in Announcements:
on site:

Discussion: No comments

Jump to comment form | comments rss | trackback uri

Leave a comment

Markdown: The kinds of formatting markup you'd use in an email will probably work here. For more details on what you can do, check out the Markdown docs.

Which is not a colour? red, green, apple, orange (required)


Site copyright 2007-2008 Chris Poirier.       Powered by Wordpress.       Entries RSS Comments RSS Validate Log in