WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
179230
Web Tooling Benchmark: fix RegExp pathologies
https://bugs.webkit.org/show_bug.cgi?id=179230
Summary
Web Tooling Benchmark: fix RegExp pathologies
JF Bastien
Reported
2017-11-02 21:34:42 PDT
We seem pathologically slow on the coffeescript part of Web Tooling Benchmark:
https://v8.github.io/web-tooling-benchmark/
Source:
https://github.com/bmeurer/web-tooling-benchmark
I get 0.22 runs / sec on STP 42, versus 8.24 runs / sec on Chrome 61.
Attachments
Add attachment
proposed patch, testcase, etc.
JF Bastien
Comment 1
2017-11-02 21:46:07 PDT
Non-fork source is actually:
https://github.com/v8/web-tooling-benchmark
Saam Barati
Comment 2
2017-11-03 13:57:06 PDT
We're spending all our time interpreting these RegExps: ^\s*###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+ 8014.546220ms ^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))? 8179.496043ms ^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)? 2951.752059ms ^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3}) 2888.876650ms Michael believes we will get much faster if we JIT these patterns.
Radar WebKit Bug Importer
Comment 3
2017-11-03 14:40:26 PDT
<
rdar://problem/35343582
>
Michael Saboff
Comment 4
2017-12-15 11:35:32 PST
Originally, the main RegExp issue was with the coffeescript test which spent most of its time in the aforementioned 4 regular expressions. Adding JIT support for greedy sub patterns (
https://bugs.webkit.org/show_bug.cgi?id=180538
) addressed some of these RegExp's. There is still the need to add JIT support for back references (
https://bugs.webkit.org/show_bug.cgi?id=180874
) to address the remaining Yarr interpreter use in coffeescript. Since this bug was created, the Web Tooling benchmark has changed. A few new tests have been added. Two of those new tests, acorn and espree, spend significant time in the Yarr interpreter evaluating non-greedy sub patterns. That work is tracked in
https://bugs.webkit.org/show_bug.cgi?id=180876
.
Michael Saboff
Comment 5
2018-09-05 11:25:24 PDT
We now have JIT support for greedy and non-greedy nested sub patterns, and back references including case ignore for 8 bit strings.
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