With Statement (v12)

Revision 12 of this benchmark created by nicolas on


Description

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

Preparation HTML

<script>
  var obj = {
   hello: function(){},
   foo : 16
  },

</script>

Test runner

Ready to run.

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

Revisions

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