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 more detailed tests results as I want to work with mobile platforms.
I haven't found how to enable or disable JIT like it exists on Squirrelfish (cf. ENABLE_JIT in JavaScriptCore/wtf/Platform.h).
Does somebody knows how to do that with v8?
Thanks.
Alexandre
Unlike other languages, The V8 engine uses both a compiler and an interpreter and follows Just in Time(JIT) Compilation for improved performance. Just in Time(JIT) Compilation: The V8 engine initially uses an interpreter, to interpret the code.
--jitless disables all runtime allocation of executable memory.
The V8 engine uses hidden classes to optimize property access time. Traditionally properties are accessed via a dictionary lookup by the JavaScript runtime environment. Since objects can change their type dynamically over time, this is a rather time consuming way to retrieve object properties.
For those who may be interested I got the following answer from Søren Gjesse on v8-users google groups.
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
On a 32 bit little endian platform you can build with the ARM simulator. This is a testing feature and performance will be terrible, but it does work and involves no direct execution of JITed code. Use the --simulator=arm option on the scons or test.py command line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With