Tuesday, April 15th, 2008
In part one, he runs tests such as:
- $('td.first').addClass('marked'); // jQuery
- // or
- $$('td.first').invoke('addClassName', 'marked');
Executed tests show that Prototype seems to be faster then jQuery, with the exception of the new insertion method, which performance should be improved. Although I like jQuery syntax more then Prototype, the performance is way more important then saving few lines of code. Of course tests that I made donâ€™t show how these libraries act in a real application, which is my task for the next part(s) of this article. Despite the results I must admit that Iâ€™m very excited about jQuery, my general impression is that this library is more mature then Prototype.
Prototype was at least 2 times faster then jQuery in 15 cases, and jQuery was faster then Prototype in 8 cases. What library should I choose? In my case I will stick with Prototype, because it offers the same functionality as jQuery does + more and itâ€™s faster. jQuery is probably better for projects where thereâ€™s a need for some fancy UI effects and thatâ€™s it, but itâ€™s just an assumption, correct me if Iâ€™m wrongâ€¦
Posted by Dion Almaer at 5:13 am