With Statement (v9)

Revision 9 of this benchmark created on


Description

http://webcloud.se/log/JavaScript-and-the-with-statement/

Preparation HTML

<script>
  var obj = {
   hello: function(a){ return 1 + a; }
  },
      value;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
without with
value = obj.hello(1);
ready
with with
with({q:obj}) {
 q.value = hello(1);
}
ready
with, only lookup
with({q:obj}) {
 q.hello(1);
}
ready
only lookup
obj.hello(1);
ready

Revisions

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