The GTK+ port takes an unexpectedly high time on the Celtic Kane "Array object" benchmark: http://celtickane.com/webdesign/jsspeed2007.php wk 605ms fx2 264ms the DOM test is also suspiciously slow: wk 261ms fx2 179ms Probably something silly going on. We need to throw a profiler at this.
Grr, I spent a little while this evening trying to find a profiler on Linux that would give me understandable data but failed miserably.
Finally got gprof working. Most of the time looks to be spent inside toString in the comparison function below ArrayInstance::sort. I have a patch locally that tweaks ArrayInstance::sort to call toString O(N) times rather than O(N log N) times, which drop the Array test from 158 to 7ms on my Linux machine. I'm not entirely sure *why* toString was proving more expensive on Linux as gprof output isn't proving very enlightening. The patch is also a win on Mac (36 -> 6ms on Array).
I'm not seeing the DOM test as being slow on my machine. It consistently takes around 25ms.
I'm re-titling this bug for now to cover the Array aspect for which I have a patch. We should file separate bugs on other parts of the benchmark that are slower than expected.
Created attachment 17939 [details] Patch
Comment on attachment 17939 [details] Patch r=me
(But I suggested an improvement to the comment)
Landed in r28782.