Shapes

September 17th, 2008

Everyone’s doing it.

Brendan added shapes to SpiderMonkey for Firefox 3 earlier this year. These exploit the latent types present in most JavaScript code. This gave the non-JIT bytecode VM in Firefox 3 quite a speedup. In fact, it’s still the fastest non-beta JS implementation. But, wow, there sure has been progress. In development versions, I think everyone other than IE is faster than Firefox 3 at this point.

In v8, I guess they call it a hidden class system. In SquirrelFish, I gather they call it StructureID.

2 Responses to “Shapes”

  1. Jesse Ruderman Says:

    But in the Chrome comic, they implicitly refer to them as “shapes” ;)

  2. Mike Shaver Says:

    I guess I think of shapes as being born with the property tree, though we weren’t using them to fully optimize property accesses at the time. (Our shape identifiers are really just alternative labels for nodes in the property tree.)

    http://tinyurl.com/3z3wn2