Building v8 without JIT ?

377 views
Skip to first unread message

A.Rames

unread,
Aug 18, 2009, 2:24:03 PM8/18/09
to v8-users
Hello,

I would like to run some tests on v8 with and without JIT to compare
performances.
I know JIT will improve my average speed performance, but it would be
nice for me to have some actual tests results.

I haven't found options to disable JIT like it exists on Squirrelfish.
Does somebody knows how to do that?

Thanks.

Alexandre

Søren Gjesse

unread,
Aug 18, 2009, 4:51:01 PM8/18/09
to v8-u...@googlegroups.com
Hi,

It is not possible to disable dynamically generated code in V8. Unlike other JavaScript engines V8 does not have an interpreter mode - it always generates native code.

One exception is the RegExp engine which have an interpreter and native code version. The compile time define V8_NATIVE_REGEXP enables generating native code for RegExp processing.

Regards,
Søren

Stephan Beal

unread,
Aug 18, 2009, 5:35:24 PM8/18/09
to v8-u...@googlegroups.com
2009/8/18 Søren Gjesse <sgj...@chromium.org>

One exception is the RegExp engine which have an interpreter and native code version. The compile time define V8_NATIVE_REGEXP enables generating native code for RegExp processing.

Are there notable advantages (for clients) in using one implementation or the other?

--
----- stephan beal
http://wanderinghorse.net/home/stephan/

Rames

unread,
Aug 18, 2009, 5:37:17 PM8/18/09
to v8-users
Thanks for your answer Søren.
I'll try to see what tests I can run on RegExps and maybe test jit on
others JSVM.

Regards

Alexandre

On Aug 18, 1:51 pm, Søren Gjesse <sgje...@chromium.org> wrote:
> Hi,
> It is not possible to disable dynamically generated code in V8. Unlike other
> JavaScript engines V8 does not have an interpreter mode - it always
> generates native code.
>
> One exception is the RegExp engine which have an interpreter and native code
> version. The compile time define V8_NATIVE_REGEXP enables generating native
> code for RegExp processing.
>
> Regards,
> Søren
>

Lasse R.H. Nielsen

unread,
Aug 19, 2009, 1:11:25 AM8/19/09
to v8-u...@googlegroups.com
The native regexp implementation is significantly faster, but it uses slightly more memory, and it's not currently available on ARM.
You should generally prefer the native implementation if it is available. It's really an artifact of development that you can still use the interpreter on platforms where native regexp is available (i.e., it made sense during development, and we haven't had a reason to remove the flag since then).

/L
--
Lasse R.H. Nielsen / l...@chromium.org
'Faith without judgement merely degrades the spirit divine'

Rames

unread,
Aug 19, 2009, 2:08:25 PM8/19/09
to v8-users
Thanks for the details. I actually want to use native implementation
in the end, but I need more details as I want to run v8 om mobile
systems.

Do you know if I can find an old version of v8 with both interpreter
and native modes, or has it been developed with native compilation
from scratch?
A version with both modes, even old, might save me a lot of work.

Thanks

Alexandre

On Aug 18, 10:11 pm, "Lasse R.H. Nielsen" <l...@chromium.org> wrote:
> The native regexp implementation is significantly faster, but it uses
> slightly more memory, and it's not currently available on ARM.You should
> generally prefer the native implementation if it is available. It's really
> an artifact of development that you can still use the interpreter on
> platforms where native regexp is available (i.e., it made sense during
> development, and we haven't had a reason to remove the flag since then).
>
> /L
>
>
>
>
>
> On Tue, Aug 18, 2009 at 23:35, Stephan Beal <sgb...@googlemail.com> wrote:
> > 2009/8/18 Søren Gjesse <sgje...@chromium.org>

Søren Gjesse

unread,
Aug 19, 2009, 5:29:30 PM8/19/09
to v8-u...@googlegroups.com
Native compilation was used in V8 from the very beginning, so you will not find any old versions having en interpreter. Regarding RegExp you will find that older versions uses PCRE for RegExp processing.

Regards,
Søren
Reply all
Reply to author
Forward
0 new messages