testone11111

JavaScript performance comparison

Test case created

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
test1
var a = new Array("日", "一", "二", "三", "四", "五", "六");
var week = new Date().getDay();
var str = "今天是星期"+ a[week];
pending…
test2
var str1 = "今天是星期";
var week = new Date().getDay();
switch (week) {
        case 0 :
                str1 += "日";
                break;
        case 1 :
                str1 += "一";
                break;
        case 2 :
                str1 += "二";
                break;
        case 3 :
                str1 += "三";
                break;
        case 4 :
                str1 += "四";
                break;
        case 5 :
                str1 += "五";
                break;
        case 6 :
                str1 += "六";
                break;
}
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 comments

Add a comment