Bug 16186 - Reduce number of c-stack-based MatchFrames
Summary: Reduce number of c-stack-based MatchFrames
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
Depends on: 16185 16187
  Show dependency treegraph
Reported: 2007-11-29 04:12 PST by Eric Seidel (no email)
Modified: 2011-09-06 22:31 PDT (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-11-29 04:12:23 PST
Reduce number of c-stack-based MatchFrames

I believe the credit for this idea goes to Darin, I heard about it through Maciej.  Currently we allocate space for 16 match frames every time we call into match().  That's excessive, since very very very few regexps ever go beyond a few frames.

Supposedly darin tried this and found that reducing to 4 frames was a big speedup.  I expect we could probably reduce to 8 frames w/o worrying too much about affecting real-world performance.  Until bug 16185 is fixed, we always use 2 frames for every regexp. :(
Comment 1 Eric Seidel (no email) 2007-11-29 05:06:11 PST
I just tested reducing FRAMES_ON_STACK to 8 and 4, and saw no change in SunSpider.  Unless I missed something, we might just want to close this bug.
Comment 2 Gavin Barraclough 2011-09-06 22:31:16 PDT
This is a proposed optimization for PCRE; we no longer use PCRE.