[webkit-dev] interested in js speed-up

Akos Kiss akiss at inf.u-szeged.hu
Tue Mar 4 00:32:26 PST 2008

Dear all,
(sorry, I don't know whom to contact directly)

we have a small team at the Department of Software Engineering, 
University of Szeged, Hungary, and we got interested in speeding up the 
JavaScript engine of WebKit. We would be happy to use our compiler 
background for the benefit of the project.


We have compiled a small list of enhancement possibilities, see below. 
Please consider it as the view of an outsider.

1) Optimizing the AST
  a) either during AST building
  b) or the already built, complete AST, possibly in a background thread.

Comment: The execution model of the JS engine is quite simple. It simply 
builds an AST from the source and executes it. Thus, there are no CFG, 
basic blocks, use-definition chains, etc., which are common in 
traditional optimizing compilers. This either makes the possible 
optimizations less powerful or requires significan effort to implement 
such analysis techniques.

2) Optimizing the AST execution.

Comment: Not enough knowledge on the internals.

3) JIT compiling the AST to another language.
  a) JIT compilation to native code.

Comment: Furthermore, the engine is currently platform independent. This 
would require platform-specific code on a per platform basis.

  b) JIT compilation to Java bytecode or ActionScript bytecode.

Comment: Huge work. Currently available compiler implementations do not 
fit to the architecture of the JS engine.

  c) JIT compilation to a new intermediate language.

Comment: Is it a good idea to come up with yet-another-bytecode?
Interesting: According to the homepage, there are plans to use a 
bytecode interpreter in the JS engine. However, it is not specified what 
kind of bytecode is meant: Java, ActionScript, or a new one?

So, this is our view. But before starting any work, we would like to 
hear the opinion of the developers. What do you think of the above? Did 
we left out something important? Do you think that we can contribute 

Best regards,

Akos Kiss
Department of Software Engineering, University of Szeged, Hungary

More information about the webkit-dev mailing list