Jorge meinte:
That's the main reason why they're called JS bechmarks, not DOM
benchmarks.
Correct. Nontheless I deem them pretty useless. If you state that V8 is
10 times faster than other engines, it hardly says anything about how it
will affect the performance of ones web applications. After all, pure JS
without DOM interaction is rarely useful.
However, my supersimple benchmark[1] shows that sorting a simple row
takes, say, 30ms on Chrome, sorting a "complicated" table (dates) takes
130ms. On Safari the figures are 40/60ms on FF 270ms/300ms. Since the
DOM manipulation is always the same, FF obviously has its problems with
rearranging the table rows (in fact it gets a lot faster, if cells are
simple and don't contain input elements). When sorting date columns,
they get converted into ISO format before being sorted. The "normal"
text column omits this "pure JS" step.
That leads to the conclusion, that Chrome needs approx. 100ms for this
step, Safari 20ms and Firefox 30ms. Whatever the reasons are (perhaps
Array.sort() in Chrome is crap?), it shows the "value" of benchmarking.
BTW: My "benchmark" can at least claim, to be rooted in a "real world"
application.
Gregor
[1]
http://web.gregorkofler.com/index.php?page=sortable