今天我们很高兴的宣布YUI 3.10pr1的发布。它可以通过Yahoo! CDN或者npm下载。我们的YUI库的演示官网也更新到了最新版本。请关注下面的测试结果。
最新版本的YUI性能大幅提升。在Chrom25,跟YUI3.8.1对比,我们能看到以下的改进。
| Benchmark | 3.8.1 | 3.10pr1 | x Change |
|---|---|---|---|
| new BaseCore() | 51,871 | 153,532 | 3 |
| new MyBaseCore() [extends BaseCore] | 51,980 | 140,016 | 3 |
| MyBaseCore with 10 simple value attributes | 20,535 | 45,541 | 2 |
| MyBaseCore with 20 varied attributes (using perf. best practices) | 11,699 | 19,153 | 2 |
| MyBaseCore with 10 simple value attributes – set() | 799,081 | 2,239,983 | 3 |
| MyBaseCore with 10 simple value attributes – get() | 2,527,214 | 10,424,878 |
4 |
当使用CustomEvent and EventTarget工作时,我们将看到:
| Benchmark | 3.8.1 | 3.10pr1 | x Change |
|---|---|---|---|
| new Base() | 13,696 | 48,067 | 4 |
| base.set() | 74,202 | 332,063 | 4 |
| base.get() | 2,330,865 | 10,810,890 | 5 |
在chrom 25,同3.8.1版本比较,CustomEvent and EventTarget性能提升:
| Benchmark | 3.8.1 | 3.10pr1 | x Change |
|---|---|---|---|
| Low-level Publish (over regular publish) | - | 1,404,890 | 5 |
| Publish | 261,855 | 531,777 | 2 |
| Fire With Payload – 10 listeners | 146,386 | 275,239 | 2 |
| Fire – 10 listeners | 176,905 | 347,636 | 2 |
| Fire With Payload – 2 listeners | 160,905 | 351,084 | 2 |
| Fire – 2 listeners | 209,820 | 671,328 | 3 |
| Fire With Payload – 0 listeners | 835,323 | 4,791,071 | 6 |
| Fire – 0 listeners | 839,048 | 5,139,582 | 6 |
| EventTarget Construction + Publish(foo) + Fire(foo) – no listeners | 104,124 | 306,288 | 3 |
除此之外还有其他改进,如:Y树的改进。
更多详情请点击:http://www.yuiblog.com/blog/2013/04/08/yui-3-10pr1/
