Bug 18989 - sunspider regexp-dna is inaccurate on firefox
Summary: sunspider regexp-dna is inaccurate on firefox
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Dave Hyatt
Depends on:
Reported: 2008-05-10 15:57 PDT by Felix
Modified: 2008-10-07 14:22 PDT (History)
9 users (show)

See Also:

Patch to update test (426 bytes, patch)
2008-10-07 13:24 PDT, Dave Hyatt
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix 2008-05-10 15:57:04 PDT
dnaInput = dnaInput.replace(k, subs[k], "g")

the 3rd arg to String.replace is a js extension in firefox/spidermonkey.  it's not supported by safari/webkit, opera, and IE.  those browsers ignore the 'g' flag, so they only replace the first match.   firefox is doing a lot more work on this test than other browsers.
Comment 1 Felix 2008-05-10 15:59:10 PDT
forgot to mention.  an easy way to confirm this is to add to the end of the test
and load it on different browsers.
Comment 2 Dave Hyatt 2008-10-07 13:24:13 PDT
Created attachment 24156 [details]
Patch to update test
Comment 3 Maciej Stachowiak 2008-10-07 13:47:56 PDT
Comment on attachment 24156 [details]
Patch to update test


Can you add a FIXME above this line indicating that it should really be doing a global substitution, not just a single one? We'll want to do that in a future SunSpider version.
Comment 4 Dave Hyatt 2008-10-07 14:22:15 PDT
Fixed in r37390.