2 ms·
It would appear that TraceMonkey does optimization differently, and they both have a long way to go: Here is what feng (@chromium.org) said on the v8-users lis
by andreyf 18y ago
It would appear that TraceMonkey does optimization differently, and they both have a long way to go:
Here is what feng (@chromium.org) said on the v8-users list:
V8 has a simple compiler that generates dummy code ;-),
there are a lot of rooms to improve from traditional compiler optimization perspective. It does not even have a register allocator.
What V8 focuses on is the bottleneck of JavaScript: property lookups. You can read papers about inline caches (small-talk, Java, etc).
Some background in GC is helpful too, currently V8 has a generational GC.
From I knew, TraceMonkey is quite different, it does speculative optimizations, which is a very interesting subject of VM and compiler development/research. It requires a interpreter/dummy compiler to fallback when speculation goes wrong. In some sense, both does runtime speculation, but inline cache patches the code if it speculates wrong, and trace jit falls back to safe solution.