Bug 16503

Summary: match limit takes at least 13% of the time on the SunSpider regexp-dna test
Product: WebKit Reporter: Darin Adler <darin>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Enhancement CC: ap, darin, eric, ggaren, mjs, zwarich
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
2.3% improvement none

Description Darin Adler 2007-12-18 10:54:28 PST
The match limit inside the regular expression execution engine slows down the regexp-dna test by about 13%. If we can find some more efficient way of preventing complex regular expressions from causing a hang, then we could get a substantial speed-up.

See bug 16458 for some history.
Comment 1 Alexey Proskuryakov 2008-05-29 08:02:00 PDT
Created attachment 21408 [details]
2.3% improvement

Removing the check altogether is a 9.5% win on my machine.

I guess this micro-optimization is unnecessary if someone has a real fix in mind, but I thought it was worth posting anyway.
Comment 2 Darin Adler 2008-05-29 09:33:37 PDT
Comment on attachment 21408 [details]
2.3% improvement

r=me

I'm not sure anyone has a handle on a "real fix".
Comment 3 Cameron Zwarich (cpst) 2008-06-08 22:36:51 PDT
Alexey, are you going to land this?
Comment 4 Alexey Proskuryakov 2008-06-09 04:28:33 PDT
I'm trying to land this periodically, but random code generation changes elsewhere cause it to be a regression overall now. One of these days, I'll get lucky and have it landed.
Comment 5 Alexey Proskuryakov 2008-06-10 07:56:39 PDT
Comment on attachment 21408 [details]
2.3% improvement

Landed in r34480, clearing review flag. Today, the win on regexp-dna was only 0.6%, but the total win was huge (0.5%), apparently due to random code generation changes.
Comment 6 Alexey Proskuryakov 2010-06-11 17:36:13 PDT
Something was landed here, so marking fixed. The rest of the bug is likely long obsolete.