You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to v8-users
Hello v8-users!
In the past I often had a regex as bottleneck in my projects, rewriting them manually to JS often helped. So I recently thought, could I write something that generates the fitting JS for a given regex? Out of that came RECO - https://github.com/Pita/reco . Unfortunately the generated code can't get quite as fast yet. It still takes about 2-3 times in benchmarks compared to the built in regex engine. But it can match all sorts of complicated regex patterns. In manual attempts to rewrite a regex I could often beat the built-in time.
I would appreciate very much help in making the generated code faster and make it beat the built-in matcher every time. Any help is appreciated, thank you :)
Peter
J Decker
unread,
Dec 17, 2020, 11:37:45 PM12/17/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
That page describes linear-time regular expressions but JS-compatible
regex engines must also support exponential-time backtracking.
As an interesting aside: V8 recently grew a
--enable-experimental-regexp-engine flag that enables /pattern/l ('l'
for 'linear time'), see
https://bugs.chromium.org/p/v8/issues/detail?id=10765 for details. I'm
pretty excited about it, it blocks off a whole class of catastrophic
backtracking bugs.