Closed Bug 804929 Opened 12 years ago Closed 12 years ago

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

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: h4writer, Unassigned)

References

(Blocks 1 open bug)

Details

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: IonSpeed
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
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.
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
Closed: 12 years ago12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.