4 ms·
> It doesnt touch the dom, is not event driven, doesnt involve loading lots of files and does not render anything. It can be argued what constitutes JS engine,
by dexen 16y ago
> It doesnt touch the dom, is not event driven, doesnt involve loading lots of files and does not render anything.
It can be argued what constitutes JS engine, and what makes other parts of browser. I'd tend toward `pure JS' view of the JS engine; excluding DOM document and DOM events. [0]
Measuring speed of `naked, bare' JS engine makes some sense, even if not directly for web developers and web users. As some other posters pointed out, JS itself may be used for server-side scripting or general data processing, where access to DOM may be irrelevant. Just raw JS and some custom API for I/O.
However, I don't trust this method of benchmarking fully. There are optimization techniques that may skew results quite a bit. I guess dead code optimization could end up taking whole loops out of JSLint's code, if there are no side effects. That was implicated in discussions about some earlier benchmarks by other authors.
----
[0] Not sure if it makes a strong case, but here goes: when Apple forked Konqueror's KHTML into WebKit, they used own JS engine instead of KJS.
- daleharvey 16y agoI agree that its a good idea to test raw js performance, particularly for browser developers, however its extremely disingenuous to represent it as a typical workload of a javascript browser application when its pretty much the opposite