[squeak-dev] Re: Using V8 for other languages

David Griswold david.griswold.256 at gmail.com
Sun Sep 7 11:56:58 UTC 2008


On Sun, Sep 7, 2008 at 4:22 AM, Paolo Bonzini <bonzini at gnu.org> wrote:

>
> > Also, compiling code that isn't in a hotspot is a waste of time, since
> > you spend much longer compiling the code than you would have spent
> > interpreting it, and can cause big compile pauses if the compiler does
> > much optimization.
>
> You can use a simple 1-pass compilation (without even register
> allocation) that takes just a few ms for any reasonable amount of code.
>  Don't forget that V8 runs (mainly) in a browser--if the browser is
> sufficiently snappy, the user won't notice a compilation pause of a few
> milliseconds.
>

Such a compiler is fast, but it produces verbose code.  I was talking about
a large body of code, the sort that might begin to be used if V8 is used on
the desktop for things like running an entire Smalltalk image, for example.
 In those sorts of cases, there is a difficult trade-off: if you use a fast
compiler like the one you are talking about, it produces verbose code that
consumes a lot of space, which was the problem for Self.  On the other hand
if you use a good compiler that produces more compact code, then you get
large compilation pauses.

Using a code cache like in Visualworks or mixed-mode hotspot compilation
like we did in Strongtalk and the JVM is how to get around that trade-off.
The question is, what does V8 do to solve this problem?  That is not yet
clear.  If they don't have some compact way of representing and executing
uncommonly-used code, then it will have problems with large bodies of code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080907/49d9d642/attachment.htm


More information about the Squeak-dev mailing list