With Statement (v10)

Revision 10 of this benchmark created on


Description

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

Preparation HTML

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

Test runner

Ready to run.

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

Revisions

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