engine didn't inline node's classIndex method because the switch statement in it wasn't inlineable. Before: RESULT heap-snapshot: _buildAggregates= 642 ms RESULT heap-snapshot: _calculateClassesRetainedSize= 738 ms After: RESULT heap-snapshot: _buildAggregates= 335 ms RESULT heap-snapshot: _calculateClassesRetainedSize= 411 ms
Created attachment 144020 [details] Patch
Committed r118509: <http://trac.webkit.org/changeset/118509>
I would have argued that that's an engine bug, and not necessarily something that we should be rewriting js for.
(In reply to comment #3) > I would have argued that that's an engine bug, and not necessarily something that we should be rewriting js for. This is definitely an engine's flaw but given that in this case we get a noticeable performance effect without affecting the code readability and that we don't have an estimation on when the bug may be fixed in the engine I think it makes sense to fix it this way.