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)
Created attachment 23032 [details] date-format-tofte.patch
in case anyone cares, the bug exists on the mozilla side here: https://bugzilla.mozilla.org/show_bug.cgi?id=451942
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.
Agreed, no complaints about the resolution.