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]
in case anyone cares, the bug exists on the mozilla side here: https://bugzilla.mozilla.org/show_bug.cgi?id=451942
Agreed, no complaints about the resolution.