Open Bug 1818830 Opened 1 year ago Updated 7 months ago

escape() from react-dom seems slower in SM than V8 and JSC

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: jrmuizel, Assigned: alexical, NeedInfo)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(1 file)

Attached file escape.js

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

Whiteboard: [sp3]

Assigning myself just because I am working on a patch that will indirectly fix this.

Assignee: nobody → dothayer
Blocks: sm-runtime
Severity: -- → N/A
Type: task → enhancement
Priority: -- → P1
Depends on: 1819722

We've done a bit of work in related areas; how's the performance gap now?

Flags: needinfo?(jmuizelaar)
Priority: P1 → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: