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.
EDIT: changed some of the tests to make sure they are doing the same thing, thanks Rick!
http://jsperf.com/jquery-tree-traversing/4
I'm basically obsessed with jsPerf. The key to jsPerf is testing two things that ultimately do the same thing, but in different ways. Comparing different things, doing different things will give you... different results. Also try to cut "noise" be reducing to the smallest unit of testable code possible (starting with cruft, shave it off)
ReplyDeleteWow,,,,, It is a admiring post relevant to its content and the point of discussion is very nice and quite informative,, people can take the guidence as well help to be fruitful by this post and sharing that you have done in this content, i like this blog... :) you can have such information on http://softrob.com
ReplyDelete