Open Bug 975132 Opened 10 years ago Updated 1 year ago

IonMonkey: investigate THREE.js optimization (slow Vector3 properties)


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





(Reporter: djvj, Unassigned)


(Blocks 1 open bug)


(Keywords: perf)

I'm not sure if this is a problem with THREE.js, or an optimization issue.  I ran into this while trying to help with some demos for MWC.

In particular the JIT Inspector revealed that a lot of hot-path assignments to the properties |x|, |y|, |z|, and |w| of Vector3 were converted to GetElementCache operations instead of StoreFixedSlot operations.

This should be investigated and fixed, whether it's bad code in the library, or bad optimization choices being made by Ion.
THREE.js is used a lot, especially in WebVR code, so ensuring that we're not slow at it for possibly stupid reasons would be nice.
Blocks: jsperf
Priority: -- → P3
Keywords: perf
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.