Bug 15900

Summary: 15% of string-validate-input.js is spent compiling the same regular expression
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ggaren
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.4   
Bug Depends on: 15861    
Bug Blocks:    

Eric Seidel (no email)
Reported 2007-11-08 13:02:36 PST
15% of string-validate-input.js is spent compiling the same regular expression I thought that ggaren fixed this with 15861, but it seems not. Unless I'm somehow missing his change in my git-repo. I tried moving "pattern" outside of the loop in string-validate-input.js and saw a 15% speed increase. Looking at the shark sample, we're still spending all our time compiling the regexp. Maybe the patch he landed as part of the old bug was just the "first step in the right direction". Well, here is a bug to cover the other steps. :)
Attachments
Eric Seidel (no email)
Comment 1 2007-11-08 13:04:24 PST
Of course, even moving pattern outside of the loop for our test run, we're still 38% slower: validate-input: 31.8% *slower* 106.4ms +/- 0.6% 140.2ms +/- 1.7% significant than spidermonkey is for this test. :(
Geoffrey Garen
Comment 2 2007-11-08 15:48:41 PST
*** This bug has been marked as a duplicate of 15902 ***
Note You need to log in before you can comment on or make changes to this bug.