I have similar results when running the code in the Firefox devtools console, however, running these benchmarks in a dedicated webpage does not show the results.
When using a dedicated web page, I see results which are in the same ranges as NodeJS and Chrome: (not comparable, as running on different hardware)
Started data Local (original) foo.html:120:11
Finished data locality test run in 8.6800 ± 1.3095 ms. foo.html:144:11
Started data Non-local (original) foo.html:120:11
Finished data locality test run in 38.9400 ± 1.6195 ms. foo.html:144:11
Started data Local foo.html:120:11
Finished data locality test run in 6.6600 ± 1.1390 ms. foo.html:144:11
Started data Non-local foo.html:120:11
Finished data locality test run in 38.6400 ± 1.5861 ms. foo.html:144:11
Started data Non-local (sorted) foo.html:120:11
Finished data locality test run in 12.1800 ± 1.8334 ms. foo.html:144:11
Started data Local (object) foo.html:120:11
Finished data locality test run in 14.4500 ± 1.1492 ms. foo.html:144:11
Started data Non-local (object) foo.html:120:11
Finished data locality test run in 49.0000 ± 1.6576 ms. foo.html:144:11
Started data Non-local (sorted array of indices) foo.html:120:11
Finished data locality test run in 53.8500 ± 2.9725 ms.
When using a dedicated web page, I see results which are in the same ranges as NodeJS and Chrome: (not comparable, as running on different hardware)
I opened a bug against the devtools console of Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1647276