Compile JavaScript to Native Code with V8

You can use the V8 snapshot functionality to precompile the code. This still means that you have to have a full version of V8 running to load the snapshot (i.e., you don’t get stand-alone native code, it needs to run inside the V8 VM), so all you save is the compilation time.
Also, the quality of snapshot code isn’t necessarily as good as JIT’ed code because JIT code can use, e.g., SSE2/SSE3 if it’s available, which snapshots can’t assume.

Leave a Comment