Posted By: Charles | Apr 29th @ 9:29 AM | 39,475 Views | 19 Comments
Lars Bak is a virtual machine master. He and team have created a Javascript VM, V8, that takes Javascript syntax and produces optimized machine code directly. The result is very performant execution of Javascript. How does V8 work, exactly? What are the basic design decisions that have gone into it's construction? Why is it designed the way it is? How fast can Javascript really run, anyway? How challenging is it to take a language like Javascript and produce highly optimized machine code?

Erik Meijer, language designer and fundamentalist functional high priest, discusses these questions and more with Lars. We also talk about the language to machine code translation versus having an intermediate step (like IL) that gets optimized further in runtime context by a JITer.

If you want to know the thinking behind the thinking of Javascript compilation, the current state of the art and future directions, then this is for you. Big thanks to Lars Bak for spending time with Channel 9!

Enjoy!
Rating:
7
0
Maddus Mattus
Maddus Mattus
Do, or do not. There is no try. - Yoda
Nice!

Good to see the good ol javascript is still alive and kicking and to see people still developing and optimizing for it.

And Erik is as always excellent,.. nice shirt again Erik Wink

You shouldnt mix all those colors in the washer Wink
It's nice to see a video on here that looks at a non-Microsoft technology up close like this.  This kind of content definitely keeps me watching.
I have NOT watched the movie clip yet.
However, V8 was developed by Google and we are seeing a video of it on Microsoft.

Can someone who watched this tell me if it looks like Microsoft will integrate it into IE in the future?

That is neat. Perhaps Microsoft will adopt V8 for their gadget engine in Windows or perhaps even IE?

Welcome Change
Perhaps you think Channel 9 is just Microsoft Marketing?
Now that is the Change We Can Believe In.

Go Obama....err Charles !
Maddus Mattus
Maddus Mattus
Do, or do not. There is no try. - Yoda

It's not change.

I like to believe Channel 9 has always been this way.

The discussion at the end about the irrelevance of intermediate languages was interesting. I've been dabbling in this area recently and intermediate languages seem to help make compiler/interpreter implementation simpler, but they can lack details you'd like to have in order to produce faster/smaller/safer code.

On the flip side, at one point Lars said why not compile F# to C#, instead of MSIL. I say you are then hampered by the semantics of C#. Quite a few functional languages compile to C and they all suffer from the tailcall problem and have to generate really unnatural C code (the well-known "trampoline" solution). One advantage of an IL is it can expose features that higher-level languages do not. C# has no concept of a "tailcall", but IL allows it.

Another argument is that an IL is really an "API ", just a weird one. Programs on either side of the API can change, but as long as the API and its behavior is stable, they can change independently. The same would be true if you generated C# but I would argue that is the kind of API I don't want to code to.

Anyways, great discussion as always!

p.s. Erik how can you say only Haskell compilers are written in pure Haskell? For shame!
aL_
aL_
Rx ftw
great stuff Smiley the "to have IL or not have IL" discussion was very interesting. i always thougt the main reason for having IL was to enable multiple languages. otherwise every language would have to write a compiler/debugger for every platform, and that would be a pain.. but in the case of V8, there is only one language so thats not as great a problem.

it would have been really interesting to hear what lars thougt of the DLR and sort of what the differences are (some are obvious ofcourse but you know what i mean) maybe if google doesnt throw lars in a dungeon somewhere for talking about this stuff, you could invite him back and have an E2E with jim hugunin Smiley (eric, lars, jim, charles and 5 hours of dv hd space Wink )

conceptually this interview is really awsome. a guy from google is on a microsoft community site talking about the internals of one of chromes most touted features Smiley there has never been a clearer manifestation of the spirit of channel9 imo. screw the buisness, screw the lawyers, screw the marketing, this is about the science, the knowledge, the ideas and the sharing there of among peers. truly great stuff

slightly of topic, who shot this by the way? charles you where standing of the the side, yet the camera panned to you, so someone else had to be shooting.. or did eric movie it using only his mighty brainwaves? Smiley (although erics mind should be functional in nature so it should really return a new camera with the right angle rather than mutating the state of the exsisting one)
Microsoft Communities