News for hackers. Stuff that matters.
Re:Actual JavaScript Engine Performance by ender7 on Thursday April 21, 2011 @01:19PM (#2471429)
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 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.

Re:Actual JavaScript Engine Performance by kenjackson on Thursday April 21, 2011 @01:26PM (#2471461)
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"

Re:Actual JavaScript Engine Performance by scott_s on Thursday April 21, 2011 @01:51PM (#2471558)
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 by pjscott on Thursday April 21, 2011 @04:05PM (#2472150)
I would recommend that anybody interested in parallelism check out the article you linked to. It can be a tad verbose, but it's got a lot of really good insights.
Re:Actual JavaScript Engine Performance by ender7 on Thursday April 21, 2011 @01:33PM (#2471492)
At the same time, "Programming Language Analysis Tool With Little To No Front-End or Real-Time Interaction" is not terribly representative of the average web application.

(what exactly is a "Javascript application" anyway? This seems like an attempt to pretend that JS is the only thing required to create a web application...)

Re:Actual JavaScript Engine Performance by dandelany on Thursday April 21, 2011 @01:37PM (#2471513)
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 by OOSeven on Thursday April 21, 2011 @01:31PM (#2471483)
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
Re:Actual JavaScript Engine Performance by bad_user on Thursday April 21, 2011 @01:50PM (#2471557)
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 by Lennie on Thursday April 21, 2011 @03:04PM (#2471888)
It shouldn't matter much.

The test was just a javascript-engine test, this test does not do any rendering by itself.

Re:Actual JavaScript Engine Performance by cemerick on Thursday April 21, 2011 @02:03PM (#2471603)
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 by ootachi on Thursday April 21, 2011 @09:46PM (#2473037)
Make sure you're using mozRequestAnimationFrame() and not setInterval(). This is by far the commonest reason for slow performance in Firefox 4.x. I looked through your source and found only setInterval(), so that may be the problem.
Re:Actual JavaScript Engine Performance by dfox on Thursday April 21, 2011 @06:50PM (#2472685)
More than that, from studying various VM techniques it seems to me, that most optimizations that make Javascript fast for computation actually harm performance of calling into foreign code (like DOM) even more so because in most browsers where is often quite significant interface mismatch between JS VM and DOM code (like plain JS objects lying on separately managed heap from DOM objects).