WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
204481
Optimize String.prototype.replace() and replaceAll() for string searches.
https://bugs.webkit.org/show_bug.cgi?id=204481
Summary
Optimize String.prototype.replace() and replaceAll() for string searches.
Mark Lam
Reported
2019-11-21 16:40:25 PST
...
Attachments
Add attachment
proposed patch, testcase, etc.
Mark Lam
Comment 1
2019-11-21 17:55:13 PST
I created 3 microbenchmarks based on string-replace.js, string-replace-generic.js, and string-replace-empty.js, but use "f" as the searchValue instead of /f/g. With these, I see that the patch in
https://bugs.webkit.org/show_bug.cgi?id=202471
did indeed regressed performance: Old New string-replace-generic-2 30.0312+-1.2393 ! 34.9829+-1.4384 ! definitely 1.1649x slower string-replace-2 29.4600+-1.1706 ! 33.9296+-2.0799 ! definitely 1.1517x slower string-replace-empty-2 20.7875+-0.4358 ! 24.9824+-1.1148 ! definitely 1.2018x slower
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug