Thursday, May 12, 2011

jQuery Tree Traversal Performance Testing

The other day on Twitter I was wondering if anyone had compared the performance on jQuery's Tree Traversal functions as often you are able to locate an element more than one way and are faced with a choice. I put this together on jsPerf, the tests are all similar, if you could run it on your browser that would be wonderful, so we can compare. 


If you have any suggestions on how to make these tests more accurate that would be better, I tried to make them all similar, this is my first experience with jsPerf. 


Screen shot 2011-05-12 at 6.57.03 PM


 


EDIT: changed some of the tests to make sure they are doing the same thing, thanks Rick!


http://jsperf.com/jquery-tree-traversing/4