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: | JavaScriptCore | Assignee: | 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)
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Eric Seidel (no email)
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
*** This bug has been marked as a duplicate of 15902 ***