« MagLev recap | Main

September 02, 2008

Chrome, V8 and Strongtalk

There's lots to like about Google's new web browser, Chrome, which was released today.  When I read the awesome comic strip introduction yesterday, however, the thing that stood out most for me was in very small type: the name Lars Bak attached to the V8 JavaScript engine.  I know of Lars from his work on Self, Strongtalk, HotSpot and OOVM, and his involvement in V8 says a lot about the kind of language implementation it will be.  David Griswold has posted some more information on the Strongtalk list:

The V8 development team has multiple members of the original Animorphic team; it is headed by Lars Bak, who was the technical lead for both Strongtalk and the HotSpot Java VM (as well as a huge contributor to the original Self VM).   I think that you will find that V8 has a lot of the creamy goodness of the Strongtalk and Self VMs, with many big architectural improvements

I'll post more on this later, but things are getting interesting...

Update: the V8 code is already available, and builds and runs fine on Mac OS X.  From the design docs, it's pretty clear that this is indeed what I was hoping for: a mainstream, open source dynamic language implementation that learned and applies the lessons from Smalltalk, Self and Strongtalk.  Most telling are that the only two papers cited in that document are titled "An Efficient Implementation of Self" and "An Efficient Implementation of the Smalltalk-80 System".

The "classes as nodes in a state machine" trick for expando properties is especially neat.

The bad news: V8 is over 100,000 lines of C++.

 

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e0098be7b3883300e554f7c8d98834

Listed below are links to weblogs that reference Chrome, V8 and Strongtalk:

Comments

Heh. I can see we've been spending the last 24 hours thinking many of the same thoughts. :-)

I wonder of Urs Hölzle had any involvement. His wiki page has him as "senior vice president of operations and Google Fellow at Google." Probably too busy to get involved in VMs these days, but you never know. (wiki page: [http://en.wikipedia.org/wiki/Urs_Hoelzle], publications: [http://www.cs.ucsb.edu/~urs/oocsb/papers.shtml]).

More details:

* No type feedback, dynamic optimization or reoptimization. There are inline caches, but used only to speed method dispatch in the way Smalltalks have used them for decades. No PICs.

* No bytecodes or interpretation at all; it's a pure JIT, compiling straight from source the first time a function is executed. Based on history from Self, that would tend to penalize larger programs with a long startup time (although perhaps abandoning inlining speeds up code generation enough that it's not too bad). This also makes it harder to make v8 host a different language.

This is based on fairly quick perusal of the source, guided by some of Griswold's comments. It could mean that v8 will get much faster over time as that more advanced tech is added. It may also mean that v8 is targeted for Android as well and is trying to stay very small. (Or perhaps it will fork and go in both directions.)

Meanwhile, where's Maglev already?!?!

Looking forward to some good news from the MagLev BOF at RailsConf Europe today.

Hi Avi, a number of links are broken above.

In playing with V8 today in Chrome on web sites with heavy JavaScript the performance was stunningly faster than with Firefox. Just first impressions.

Often the pages take a while to come up but when they do they are fast.

I wonder would it take for a squeak vm to be ported?

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

My Photo

Twitter Updates

    follow me on Twitter