Ionmonkey: JM+Ion 5x slower on accessing not set property

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
6 years ago
6 years ago

People

(Reporter: h4writer, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
Testcase:
var Camera = function() {}
for (var y = 0; y < 20000000; y++) {
  var scene = new Camera()
  scene.test
}

ion: 0m2.702s
jm:  0m0.527s
v8:  0m0.177s
Good catch, we have to port the missing property IC to Ion. Luke added it to JM a few months ago (bug 777630).
Blocks: 705294

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 792631
I remove the duplicate status because Bug 792631 deals with 2 non-intersecting typesets and this test case deals with only one typeset.  Thus I assume the gap we see between JM and v8 is related to the usage of an IC instead of inlining it.  This imply modifying IonBuilder to check for non-existing properties and inline it as a known constant which value is UndefinedValue.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
v8 does not inline unknown properties, it uses an IC. When I hoist "var scene = ..." outside the loop, v8's score drops from 100ms to 173ms. With JM-only, the time drops from 436ms to 86ms. So this is mostly bug 792631, but our object allocation is also slow.
Of course, I have those numbers backwards - hoisting improves v8's score from 173ms to 100ms, which is a much smaller improvement than with JM+TI.
(Reporter)

Comment 6

6 years ago
ion: 0m0.546s
jm:  0m0.618s
v8:  0m0.195s

This got fixed along the line. At least we are now on par with JM. V8 is much faster on this benchmark though, because V8's constructing calls are much faster. Not sure if we can improve on this in the short run (and if we want to, because I thought we are faster on operations on objects)
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.