literal vs new (objects) (v2)

Revision 2 of this benchmark created by Alexander Makarenko on


Preparation HTML

<script>
  var o;

  if (!Object.create) {
    Object.create = function(o) {
      var f = function() {};
      f.prototype = o;
      return new f;
    }
  }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
new
o = new Object;
ready
literal
o = {}
ready
Object.create
o = Object.create(Object.prototype);
ready

Revisions

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