On 6/19/14, 8:56 PM, Nicholas Nethercote wrote:
It's an analysis of V8, and describes how it is over-specialized for
benchmarks vs. real code and how they fixed it. Required reading for
some of the people on this list!
So a few interesting things jump out at me:
1) The |new function() { ... }| pattern, which leads to a new proto
each time the line is reached. The one example in the paper from a
concrete site seems to be something that would run exactly once per page
load, though. I wonder how common this pattern is in general, and why
they saw it as a significant source of type instability in their testing.
2) They cite page loads and creation of new standard objects as a
source of prototype instability. Does V8 share code across pages? That
might explain why once-per-page things of the |new function() {}| sort
showed up as type instability.
3) It sounds like in V8 the shape covers the values of function-valued
properties. I seem to recall that we also used to do that back in the
property cache days (and
<https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Internals/Property_cache>
agrees), but I'm pretty sure we stopped, right? Do TI types cover that
sort of thing? I'd think they also don't...
-Boris
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals