WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
20544
Sunspider: date-format-tofte has O(n) arrayExists function
https://bugs.webkit.org/show_bug.cgi?id=20544
Summary
Sunspider: date-format-tofte has O(n) arrayExists function
Norman Rasmussen
Reported
2008-08-27 08:22:37 PDT
The attached patch removes the arrayExists function and converts switches from a list to a hash. The reasoning for this patch has nothing to do with WebKit at all, but the new Firefox 3.1 JS jit runs approx 180x times _slower_ (than the non-jit code) without this patch. With this patch the code runs at mostly the same speed. So the patch makes the test, actually test the string formatting, and not strange tight-loops created by non-core array functions. (The test is meant to test string formatting, not array.exists functionality)
Attachments
date-format-tofte.patch
(1.64 KB, patch)
2008-08-27 08:24 PDT
,
Norman Rasmussen
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Norman Rasmussen
Comment 1
2008-08-27 08:24:12 PDT
Created
attachment 23032
[details]
date-format-tofte.patch
Norman Rasmussen
Comment 2
2008-08-27 08:34:51 PDT
in case anyone cares, the bug exists on the mozilla side here:
https://bugzilla.mozilla.org/show_bug.cgi?id=451942
Mark Rowe (bdash)
Comment 3
2008-08-27 11:40:15 PDT
Changing SunSpider to work around a performance bug in Mozilla's new JS engine is not a good idea. The code in the benchmark may not be great JavaScript, but it is representative of JS code on the web. It highlights an important regression in Mozilla's code which I'm sure they'll be happy to fix.
Norman Rasmussen
Comment 4
2008-08-28 02:34:48 PDT
Agreed, no complaints about the resolution.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug