Live data from Hacker News

Actual JavaScript Engine Performance

crockford.com

21–30 of 65 posts

Re: Actual JavaScript Engine Performance

#21
If I was trying to think of something less representative of large well written javascript application I would have a hard time thinking of something better than JSLint.

It doesnt touch the dom, is not event driven, doesnt involve loading lots of files and does not render anything

Re: Actual JavaScript Engine Performance

#22
post #11

I think even this test fails to capture true JS performance due to it's lack of DOM performance testing. This may not be terribly fair - is the performance of the DOM API still "Javascript"? - but then again, I'd prefer "useful" over "fair." Most of my JS tends to interact with the DOM in some manner, so it won't really matter if the pure JS stuff screams if the DOM is slow. Another question: Crockford claims that JS…

Crockford claims that JSLint is more indicative of true JS performance, but doesn't really explain why. I think we're all predisposed to take him at his word, but I'd still like an explanation "So I have come up with a benchmark that should be more representative of large, well-written JavaScript applications. It is in fact a popular, large, well-written JavaScript application"

Sure, but all "large, well-written JavaScript applications" are not created equal. This test in particular tests JSLint's performance at parsing its own JS source file. How many large Javascript applications spend most of their runtime parsing Javascript rather than traversing the DOM? I suspect not many.

Re: Actual JavaScript Engine Performance

#23
post #17
post #11

I think even this test fails to capture true JS performance due to it's lack of DOM performance testing. This may not be terribly fair - is the performance of the DOM API still "Javascript"? - but then again, I'd prefer "useful" over "fair." Most of my JS tends to interact with the DOM in some manner, so it won't really matter if the pure JS stuff screams if the DOM is slow. Another question: Crockford claims that JS…

I study visualization websites frequently, and found Chrome much faster than other browsers (among all stable releases). Example page (not sure how well written): http://vis.stanford.edu/protovis/ex/force.html

Chrome 10.0.648 certainly does better than Firefox 4.0.1, when running on Ubuntu, for the example you gave.

This has also been my experience; I don't know what these benchmarks are doing, but Chrome is still the fastest in my perception.

Also, the article doesn't mention OS used for the tests. It is certainly of importance since the performance on Firefox 4.0.1 certainly suffers on Linux and Win XP, versus Windows 7 -- which makes the comparison unfair, and a good benchmark would certainly mention results on multiple OSes.

Re: Actual JavaScript Engine Performance

#24
post #11

I think even this test fails to capture true JS performance due to it's lack of DOM performance testing. This may not be terribly fair - is the performance of the DOM API still "Javascript"? - but then again, I'd prefer "useful" over "fair." Most of my JS tends to interact with the DOM in some manner, so it won't really matter if the pure JS stuff screams if the DOM is slow. Another question: Crockford claims that JS…

Crockford claims that JSLint is more indicative of true JS performance, but doesn't really explain why. I think we're all predisposed to take him at his word, but I'd still like an explanation "So I have come up with a benchmark that should be more representative of large, well-written JavaScript applications. It is in fact a popular, large, well-written JavaScript application"

That doesn't fly. It's missing an explanation of the characteristics of JSLint, and how those characteristics are often shared with other large JavaScript applications. My own personal intuition is that JSLint is not representative of typical web applications, so I need convincing.

To get an idea of where I come from regarding this, check out "The Landscape of Parallel Computing Research: A View from Berkeley": http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-18... They systematically classified several different kinds of computational patterns, and explained how those patterns appear in application areas. I don't expect a blog post to have that level of rigor, but I expect something at least in that form.

Re: Actual JavaScript Engine Performance

#25
I am not seeing any links to either a working instance of jsmeter or to its source code. I find research papers full of words and pretty pictures, but no source code to examine and test myself.

Does anyone know where we can see this in action?

Re: Actual JavaScript Engine Performance

#26
"So I have come up with a benchmark that should be more representative of large, well-written JavaScript applications. It is in fact a popular, large, well-written JavaScript application: JSLint."

Translation From Crockford Speak to English:

So I have come up with a benchmark that should be more representative of my code. It is in fact my code.

Re: Actual JavaScript Engine Performance

#28
post #17
post #11

I think even this test fails to capture true JS performance due to it's lack of DOM performance testing. This may not be terribly fair - is the performance of the DOM API still "Javascript"? - but then again, I'd prefer "useful" over "fair." Most of my JS tends to interact with the DOM in some manner, so it won't really matter if the pure JS stuff screams if the DOM is slow. Another question: Crockford claims that JS…

I study visualization websites frequently, and found Chrome much faster than other browsers (among all stable releases). Example page (not sure how well written): http://vis.stanford.edu/protovis/ex/force.html

I agree; throughout the development of Clojure Atlas (which uses Raphael and arborjs heavily), I've observed this rough ranking:

Chrome > IE >= Safari > Firefox

Re: Actual JavaScript Engine Performance

#30
Browsers have been optimizing the hell out of their JavaScript engines over the past several years, which is awesome for both client-side web apps and server-side JavaScript. 5 years ago JavaScript performance may have been the bottleneck, but now it's likely often DOM operations.

Dromaeo (http://dromaeo.com/) from John Resig is one of the few JavaScript benchmarks that includes DOM performance tests. We need more of these.

I think the only way to get a good picture of JavaScript (and DOM) performance is to put each benchmark result for each engine in a matrix and draw conclusions from there. Browsers will inevitably optimize for popular benchmarks (see: Acid3) or have benchmarks that suit their engine. If we aggregate everyone's benchmarks and that is the standard for measuring JavaScript/browser performance there is less incentive to do these micro-optimizations.

Post reply on HN