views:

681

answers:

5

This is pretty interesting, this site runs a speed test and compares all of these;

  • PureDom
  • jQuery 1.2.6
  • jQuery 1.3.2
  • Prototype 1.6.0.3
  • MooTools 1.2.2
  • qooxdoo 0.8.2
  • Dojo 1.2.3
  • Dojo 1.3.1
  • YUI 2.7.0

Javascript frameworks Speed Comparison

Bases on this it seems like the newest jquery version is almost 2x faster then the older version, however even the newest jquery did not perform that well IMO

Question time:
1. So my question, I am new to javascript, do you think this test is pretty accurate?
2. If it is does this even mean anything in terms of performance or is it not even noticable?

+1  A: 

Performance of the popular JavaScript libraries is more than adequate. It depends a lot on what you do with them too: Even though jQuery may be quick "on paper", it's a library that you can easily use to create very slow code unintentionally. Easy to do lots of inefficient DOM modifications with it for example.

Since the libraries are all fast, what matters to me personally is the development speed and suitability of the library itself. Some are better suited for certain things than others.

Jani Hartikainen
+1  A: 
redsquare
Then you're only testing 1 (*one*) append(), not 250. That's not the same test at all. Sure, it's faster, but that's not the point as your optimization is not framework specific.
Thorarin
But the reason still holds true to ignore the results as they count for nothing.
redsquare
It is the point. The question is if he should take notice of the results. The answer is no and above is why!
redsquare
And the tests are not a fair comparison. Dojo uses dom methods in its test for example.
redsquare
A: 

first of all, that test is an purely theoretical test, of just speed and nothing else (no memory usage calculated, no real world usage etc.) and in addition to that the most important of a libary is not theoretical speed, itś functionality and support.

secondly, on a performance scale, all libaries are fast enough to do do anything you need it to do, it's the programmer that makes it slow.

finally, my personal opinion is that you just should go with the latest version of jQuery, for it's usability (CSS3 selectors) and simple AJAX implementation.

alexanderpas
+1  A: 

you'll want to choose a library that meets your needs.

  • Does it make node(set) selection easy
  • Does it make DOM manipulation easy
  • Does it make event binding easy
  • Does it make basic animation easy
  • Does it make AJAX easy
  • Does it fix IE bugs along the way during the above?
  • Does it scale? are there plugins available?
  • Is there documentation, support, a community of developers out there

Find the library that works for you and go for it. Over time both you and the library publisher will find the best ways to maximize performance for your code.

scunliffe
+2  A: 
Thorarin
There's never a single test where PureDom is slower here on my machine
toto