4 ms·
Compiled vs interpreted is not a useful distinction. Until fairly recently when Ignition was introduced, V8 had no interpreter. All the JS was compiled by the f
by jashmatthews 7y ago
Compiled vs interpreted is not a useful distinction. Until fairly recently when Ignition was introduced, V8 had no interpreter. All the JS was compiled by the first tier “full codegen”
The bigger difference is that the JVM is heavily optimized for performance after a long warmup and V8 needs to produce relatively fast code early during page loading.
Java being much more static certainly helps warmup time but ultimately doesn’t really affect final performance. LuaJIT can beat C in some cases once it has time to compile all traces needed.
- The_rationalist 7y agoV8 needs to produce relatively fast code early during page loading So for e.g backend js programs is it possible to ask v8 to take more time to optimize?
- saagarjha 7y agoWhy would would you want it to take longer to optimize?
- The_rationalist 7y agoTo get more time to generate betten codegen so a faster program (but slower "launch time")
- saagarjha 7y agoMost VMs will recompile long-running hot code; I’d assume V8 does this as well.