Open Bug 1349148 Opened 3 years ago Updated 11 months ago

Improve performance of megamorphic stubs


(Core :: JavaScript Engine: JIT, enhancement, P3)





(Reporter: jandem, Assigned: denispal, NeedInfo)


(Blocks 1 open bug)


(Keywords: perf, Whiteboard: [qf:investigate])

Some random ideas to consider/investigate:

* We could add a 1-entry cache to ShapeTable (both for hits and misses).

* We create a ShapeTable when there are more than 11 entries (ShapeTable::MIN_ENTRIES) but we should measure what the best value is for this nowadays. Since bug 1314569 we can purge ShapeTables on GC so we could be a bit more eager.

* Maybe when the number of entries is small, it would be faster for ShapeTable to store an array of {id, Shape*}.

* We could add a global cache/HashTable to avoid looking at each object on the proto chain.
* We should also check how common ShapeTable hash collisions are.
Whiteboard: [qf]
Whiteboard: [qf] → [qf:investigate]
Keywords: perf
Moving to p3 because no activity for at least 1 year(s).
See for more information
Priority: P2 → P3
I can do some of these measurements, especially since I have the instrumentation already setup from bug 1384808.
Assignee: nobody → dpalmeiro
Flags: needinfo?(dpalmeiro)
You need to log in before you can comment on or make changes to this bug.