perffunc2

Benchmark created by balaji on


Setup

var left_context_index =
        new Array(
        0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,
        4, 4, 5, 5, 6, 6, 7, 7, 8
    );
    
    function globacc()
    {
       var total=0;
       for (var i=0;i<25;i++)
        total = total + left_context_index[i];
    }
    
    function glob2acc()
    {
       var total=0;
       var lleft_context_index = left_context_index;
       for (var i=0;i<25;i++)
        total = total + lleft_context_index[i];
    }

Test runner

Ready to run.

Testing in
TestOps/sec
test1
globacc();
ready
test2
glob2acc();
ready

Revisions

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

  • Revision 1: published by balaji on