Meryl Silverburgh | 13 May 09:18 2009
Picon

squirrelfish-bytecode

Hi,

Does webkit cache squirrelfish bytecode? For example, multiple can use
the same javascript file (e.g. common javascript libraries, like
jquery, or same domain uses some common javascript file across
different pages for the same domain).

When webkit parses the JS file and builds squirrelfish-bytecode,  does
it cache it ? so that subsequence loading of the same js file will
skip the js compile process?

Thank you.
Maciej Stachowiak | 13 May 10:11 2009
Picon

Re: squirrelfish-bytecode


On May 13, 2009, at 12:18 AM, Meryl Silverburgh wrote:

> Hi,
>
> Does webkit cache squirrelfish bytecode? For example, multiple can use
> the same javascript file (e.g. common javascript libraries, like
> jquery, or same domain uses some common javascript file across
> different pages for the same domain).
>
> When webkit parses the JS file and builds squirrelfish-bytecode,  does
> it cache it ? so that subsequence loading of the same js file will
> skip the js compile process?

We don't currently cache the bytecode (or the native code). It is an  
option we have considered, however, currently, code generation is a  
trivial portion of JS execution time (< 2%), so we're not pursuing  
this at the moment.

Regards,
Maciej
Meryl Silverburgh | 13 May 18:09 2009
Picon

Re: squirrelfish-bytecode

On Wed, May 13, 2009 at 1:11 AM, Maciej Stachowiak <mjs <at> apple.com> wrote:
>
> On May 13, 2009, at 12:18 AM, Meryl Silverburgh wrote:
>
>> Hi,
>>
>> Does webkit cache squirrelfish bytecode? For example, multiple can use
>> the same javascript file (e.g. common javascript libraries, like
>> jquery, or same domain uses some common javascript file across
>> different pages for the same domain).
>>
>> When webkit parses the JS file and builds squirrelfish-bytecode,  does
>> it cache it ? so that subsequence loading of the same js file will
>> skip the js compile process?
>
> We don't currently cache the bytecode (or the native code). It is an option
> we have considered, however, currently, code generation is a trivial portion
> of JS execution time (< 2%), so we're not pursuing this at the moment.
>
> Regards,
> Maciej
>

Thanks. You mention native code. Under what situation will
squirrelfish generate native code?
I thought this is how v8 works, but not squirrelfish.  Squirrelfish
parse JS files and generate its internal bytecode and its VM will
execute the bytecode. Is that correct? or I am missing something.

Thank you.
(Continue reading)

Darin Adler | 13 May 18:24 2009
Picon

Re: squirrelfish-bytecode

On May 13, 2009, at 9:09 AM, Meryl Silverburgh wrote:

> You mention native code. Under what situation will squirrelfish  
> generate native code? I thought this is how v8 works, but not  
> squirrelfish. Squirrelfish parse JS files and generate its internal  
> bytecode and its VM will execute the bytecode. Is that correct? or I  
> am missing something.

This blog post from last September should answer your question: http://webkit.org/blog/214/introducing-squirrelfish-extreme/

     -- Darin

Gmane