Closed
Bug 1818830
Opened 3 years ago
Closed 1 year ago
escape() from react-dom seems slower in SM than V8 and JSC
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: jrmuizel, Assigned: alexical, NeedInfo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sp3])
Attachments
(1 file)
|
7.42 KB,
application/x-javascript
|
Details |
escape:
function escape(key) {
var escaperLookup = {
"=": "=0",
":": "=2"
};
return "$" + ("" + key).replace(/[=:]/g, function(match) {
return escaperLookup[match];
});
}
On the attached benchmark I get:
SM w/ spectre-mitigations off: 38ms
V8: 25ms
JSC: 38ms
The keys used in the benchmark are taken from react-todoMVC
| Reporter | ||
Comment 1•3 years ago
|
||
SM profile: https://share.firefox.dev/3ZgPeYc
V8 profile: https://share.firefox.dev/3Z0gCdo
| Reporter | ||
Comment 2•3 years ago
|
||
JSC profile: https://share.firefox.dev/3xQh3eh
Updated•3 years ago
|
Whiteboard: [sp3]
Updated•3 years ago
|
See Also: → https://mozilla-hub.atlassian.net/browse/SP3-26
| Assignee | ||
Comment 3•3 years ago
|
||
Assigning myself just because I am working on a patch that will indirectly fix this.
Assignee: nobody → dothayer
Updated•3 years ago
|
Comment 4•2 years ago
|
||
We've done a bit of work in related areas; how's the performance gap now?
Flags: needinfo?(jmuizelaar)
Priority: P1 → P3
Comment 5•1 year ago
|
||
original testcase:
- Chrome: 11ms (https://share.firefox.dev/3Cm8DRO)
- Nightly: 10ms-12ms (https://share.firefox.dev/3ElizeJ)
10x loopcpunt
- Chrome: 100ms (https://share.firefox.dev/3Cdy7Rp)
- Nightly: 100ms https://share.firefox.dev/4jz3IO0
100x loopcount
- Chrome: 1050ms (https://share.firefox.dev/4hxRzay)
- Nightly: 950ms-1000ms (https://share.firefox.dev/4gda1UH)
Worth keeping this open?
Comment 6•1 year ago
|
||
Looks fixed to me!
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•