zoukankan      html  css  js  c++  java
  • jquery,mootools,ext3,prototype对class选择符速度比较

    共1296个元素,结果为:

      ie8 ff 平均值 排名
    extcore3 20.4 6.31 13.355 1
    jquery 25.05 3.79 14.42 2
    prototype 81.09 6.93 44.01 3
    mootools 77.6 19.1 48.33 4

    <script src="firebug/firebug.js" type="text/javascript"></script>

    <script src="jquery-1.3.2.js" type="text/javascript"></script> 
    <!-- <script src="mootools-1[1].2.1-core-nc.js" type="text/javascript"></script>-->
    <!-- <script src="ext-core-debug.js" type="text/javascript"></script>-->
    <!-- <script src="prototype.js" type="text/javascript"></script>-->
    <script type="text/javascript">
        var icount = 0;
        window.onload = function() {
            var begin = new Date();
            var i = $('.aaa').length;                          //jquery
            //var i = Ext.query('.aaa').length;            //ext
            //var i = $$('.aaa').length;                      //mootools,prototype
            console.log("共" + i + "个,用时共:" + (new Date() - begin));
            if (++icount < 100)
                arguments.callee();
           
        }
    </script>

    测试文件及结果明细表

  • 相关阅读:
    数据库排名函数(Rank)
    请求支付报表的测试
    DateTime详细资料转载
    sqlserver2005的安装问题
    Hdu 1398 Square Coins
    HDU 1709 The Balance
    POJ 1423 Big Number
    hdu 1106 排序
    HDU 1028 Ignatius and the Princess III
    并查集Is It A Tree?hdu 1325
  • 原文地址:https://www.cnblogs.com/cola/p/1443704.html
Copyright © 2011-2022 走看看