efficient-java-script-02

Benchmark created by Arun_neo on


Preparation HTML

<script type='text/javascript'>
        var myGlobalVar = {aobj:{temp:'sss'},bobj:'sfsdfsfss'};
</script>

Setup

function toTestLocalScope(){
                var myLocalVar = {aobj:{temp:'sss'},bobj:'sfsdfsfss'};
                console.log(myLocalVar.aobj.temp);
        }
        
        function toTestGlobalScope(){
                console.log(myGlobalVar.aobj.temp);
        }

Test runner

Ready to run.

Testing in
TestOps/sec
toTestLocalScope
toTestLocalScope();
ready
toTestGlobalScope
toTestGlobalScope();
ready

Revisions

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

  • Revision 1: published by Arun_neo on