Float32: investigate Markov chains benchmark performance on ARM

NEW
Unassigned

Status

()

Core
JavaScript Engine: JIT
P5
normal
5 years ago
2 years ago

People

(Reporter: bbouvier, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

5 years ago
On x86 and almost all ARM devices, the Markov chain benchmark gives a positive speedup when using Float32 instead of Float64:

- x86: 21% better
- Nexus 4: 15%
- Galaxy S3: 18%

Marty told me on IRC that the Nexus 10 showed a 60% slowdown, with no slow-script dialog. Moreover, Luke found out that Chrome for Android is faster than Firefox for Android (with or without the Float32 optimizations), so this confirms that it might be an ARM code generation bug.

This bug's goal is to investigate what happens with this device, if it's an ARM related bug and how to fix it.

You can run the benchmark in the browser directly at the given URL or by cloning the repo [0] and then follow the instructions to run it in the shell.

[0] https://github.com/BenjBouv/floats32-bench
Chrome is faster than FF mainly because of all the NaN canonicalization when loading floating point values from the typed arrays. Also Chrome uses the ARM multiply-accumulate instruction which might help a little.

Not sure about the Nexus 10 slowdown, but it might give more clues if the test could be repeated with the NaN canonicalization disabled.

Updated

4 years ago
Blocks: 579390
You need to log in before you can comment on or make changes to this bug.