Closed
Bug 1406074
Opened 7 years ago
Closed 5 months ago
Slow benchmarks for value mapping tests
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
RESOLVED
INCOMPLETE
Tracking | Status | |
---|---|---|
firefox57 | --- | wontfix |
People
(Reporter: burton449ryo, Unassigned)
Details
(Keywords: perf)
User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20170926190823
Steps to reproduce:
The following tests returns weird benchmarks in FF v56 in 64 bits.
http://jsben.ch/o0UDx
Those tests just compare speed between if/else, switch case and value mapper. In all other browsers, the value mapper is the fastest, but not in FF.
People from this forum https://stackoverflow.com/a/8624971/1914034 mentioned that the value mapper test was the fastest in past versions of FF.
Those tests might point out that something is going wrong with FF.
Actual results:
The fastest test was the if/else test.
Expected results:
The fastest test should be the mapper test.
Reporter | ||
Comment 1•7 years ago
|
||
This test shows the same weird behaviour: https://jsperf.com/performance-of-assigning-variables-in-javascript/2
Updated•7 years ago
|
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Comment 2•7 years ago
|
||
The mapper will be faster if you don't create a new object on every call/iteration - move the object literal into the global scope or something.
I expect the if-else/switch to be faster than allocating a brand new object each time just to do a single lookup.
Updated•7 years ago
|
status-firefox57:
--- → wontfix
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
Updated•5 months ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 5 months ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•