[antlr-interest] (Slightly OT) Of interest to Interpreter writers

Ian Kaplan iank at bearcave.com
Tue Jun 3 09:28:25 PDT 2008


  Thanks for posting the interesting link, Richard.  Squirrelfish looks
interesting.  It sounds like they may be doing good things with their
interpreter.

  This said....

  Reading the posting on the blog, the authors basically say: we used to use
a recursive tree walker that interpreted the syntax tree for JavaScript.  In
our new Way Cool and Innovative JavaScript processor we compile the
JavaScript into byte code.  This amazing innovation produces much faster
JavaScript execution.  It avoid unnecessary function called (yes, you can do
it all in a switch statement contained within a byte code fetch loop).

  I'm sorry, but none of this should have been a surprise.  Perhaps some of
those "stacks of terrible books" mentioned in the article were books on
compiler and interpreter design.

  Perhaps I'm being unfair since I am not familiar with the execution
constraints for JavaScript.  But generating simple, unoptimized, byte code
should not be much slower than generating the syntax tree and, as the
authors not, produce faster execution.

  Ian
  www.bearcave.com

On Tue, Jun 3, 2008 at 9:15 AM, Richard Clark <rdclark at gmail.com> wrote:

> It's a little off-topic re: ANTLR, but of interest to compiler and
> interpreter developers. Here's an interesting post on how the WebKit
> team just sped up their Javascript interpreter by 60%:
>
> http://webkit.org/blog/189/announcing-squirrelfish/
>
> ...Richard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080603/1556176b/attachment.html 


More information about the antlr-interest mailing list