测试JS引擎性能
8月 24th, 2008 Posted in FireFox, JavaScript < by Johnny Woo >
http://wd-testnet.world-direct.at/mozilla/dhtml/funo/jsTimeTest.htm
FireFox 3.1pre里面如果打开了jit
确实运行js如飞
新的trace monkey引擎对于spider monkey来说
在大多数项目上都有100~300%的增幅
除了parseint以外
希望FireFox 3.1可以快些到来
因为pre版不支持任何FF插件
还不能当作正式生产环境的工具来用.
8月 25th, 2008 at 8:25 上午
不是不支持,只要装上MR Tech Toolkit (formerly Local Install) 或Nightly Tester扩展就可以方便安装其他扩展了。
8月 25th, 2008 at 9:28 上午
3Q.估计很快其他浏览器也会使用JIT的JS引擎
8月 25th, 2008 at 2:29 下午
速度确实是飞快,不过不知道为什么 在linux 环境下 字符串连接测试反而慢了很多
下面这个函数
#######################################
function testConcatStrings()
{
var string1 = ‘abcdefghijklmnopqrstuvxyz’
var string2 = ‘abcdefghijklmnopqrstuvxyz’
var string3;
start = new Date();
for (var i=0; i<=1000000; i++)
{
string3 = string1 + string2;
}
end = new Date();
concatStringsTime = end-start;
var textElem = document.createTextNode(concatStringsTime + ‘ms ‘)
document.getElementById(’concatStringsResult’).appendChild(textElem);
completed();
}
############################################
firefox3.0 concatenate strings 1000000 times:1318ms
firefox3.1 concatenate strings 1000000 times:3227ms