Byon April 10, 2009 3:25 PM
I was asked to lend a hand with the TaskSpeed tests for YUI, and while I did contribute some code, the bulk of the work was done by Eric Ferraiuolo, with some performance cleanups offered by Luke Smith of Yahoo!. The YUI 2.7.0 version is already up on the TaskSpeed site, and we’re waiting on some fixes to land in the YUI 3 branch on GitHub, namely a few weaknesses surrounding YUI 3’s CSS Selectors that need to be addressed. The small amount of work I did was around the YUI 3 tests.
What I found to be greatly impressive was how well YUI 2 holds up compared to, say, JQuery. YUI has a reputation among a lot of web developers for being really bloated. At least with YUI 2, this seems to have little basis. The YUI-270.js filed used in TaskSpeed weighs in at only 44K, easily the most compact of the frameworks (JQuery 1.3.2, comes in second at 56K). Not only that, but in several cases it significantly outperforms the other frameworks (to be fair, in a few tests, it’s beaten out by JQuery handily).
This is probably one of the most significant comparisons of Framework performance that I’ve seen, since it’s one of the only benchmarks I’m familiar with that specifically targets the Frameworks, and not the underlying browser engine. Due to this, it serves as a good benchmark for decided what kind of DOM operations are most important to your app, and what engine will likely do best under those circumstances. On the other hand, the tests are somewhat contrived as they usually involve a significant number of repititions on a test, which is somewhat less realistic, but still interesting.
It will be interesting to see how YUI 3 fares as some of the bugs in the framework (which is still alpha) get worked out, and the speed improved. YUI 3 is definitely a syntactic improvement over YUI 2, but I hope that the YUI team, and the Community surrounding them (particularly now that code can be more easily contributed to via github), will work to make YUI 3 a faster and better product than YUI 2 is today. While I may be downplaying the significance of benchmarks in general, I do feel this is significant because it shows that YUI really does hold it’s own among other frameworks.