JavaScript algebra calculation on FireFox is slower than on Chrome
Categories
(Core :: JavaScript Engine: JIT, defect, P2)
Tracking
()
People
(Reporter: hogehoge, Unassigned)
Details
(Keywords: perf, perf:responsiveness)
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36
Steps to reproduce:
- Go to Three.js matrix calculation performance benchmark test page https://rawcdn.githack.com/mrdoob/three.js/r101/test/benchmark/benchmarks.html
- Click "Start" next to "Update world transforms"
- See the Ops/Sec numbers (bigger means faster)
- Compare the numbers between on FireFox and on Chrome
Relevant codes:
https://github.com/mrdoob/three.js/blob/r101/test/benchmark/core/UpdateMatrixWorld.js#L9-L46
https://github.com/mrdoob/three.js/blob/r101/src/core/Object3D.js#L593-L633
https://github.com/mrdoob/three.js/blob/r101/src/math/Matrix4.js#L741-L775
https://github.com/mrdoob/three.js/blob/r101/src/math/Matrix4.js#L378-L416
Actual results:
You see that the number on FireFox is much worse than the one on Chrome. On my windows FireFox is 2-3x worse.
FireFox:
depth=100, breadth=1 (101 nodes): 44442 Ops / Sec, 4.02
depth=3, breadth=10 (1111 nodes): 4306 Ops / Sec, 3.06
depth=9, breadth=3 (29524 nodes): 117 Ops / Sec, 1.49
Chrome:
depth=100, breadth=1 (101 nodes): 122936 Ops / Sec, 4.12
depth=3, breadth=10 (1111 nodes): 11759 Ops / Sec, 3.78
depth=9, breadth=3 (29524 nodes): 149 Ops / Sec, 5.48
Expected results:
The number on FireFox should be as good as the one on Chrome.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 1•4 years ago
|
||
Comment 2•4 years ago
|
||
Comment 3•4 years ago
|
||
Per attachment of Comment 1 and Comment 2, we have a similar result in FxR standalone (GeckoView) vs Oculus browser (Chromium) too when running "Update world transforms".
FxR:
depth=100, breadth=1 (101 nodes): 4368 Ops / Sec, 1.18
depth=3, breadth=10 (1111 nodes): 319 Ops / Sec, 3.67
depth=9, breadth=3 (29524 nodes): 11 Ops / Sec, 2.39
Oculus Browser:
depth=100, breadth=1 (101 nodes): 37478 Ops / Sec, 0.92
depth=3, breadth=10 (1111 nodes): 2872 Ops / Sec, 2.50
depth=9, breadth=3 (29524 nodes): 43 Ops / Sec, 2.30
Comment 4•4 years ago
|
||
Iain, would you be able to investigate this issue?
Daosheng, would it be possible to have a JS shell / Browser benchmarks which reproduce the issue you are seeing?
From what I understand, what you are reporting is non-actionable from us, as this require a head-set. Do we have any harness for running these benchmarks in automated test, or even better on a local computer?
Also, are you able to bisect this regression?
Comment 5•4 years ago
|
||
Shell script to run the three.js benchmark.
Comment 6•4 years ago
|
||
Browser runner can either be derived from the shell script or by directly running the web page linked in comment #0.
Comment 8•4 years ago
|
||
I just come back from my PTO, please let me if you need any assistance.
Comment 9•4 years ago
|
||
I am currently busy landing the regexp engine update, but I will take a look at this when I have some spare cycles.
Updated•2 years ago
|
Updated•2 years ago
|
Description
•