Object v Literal
JavaScript performance comparison
Test case created
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
Testing in unknown unknown
| Test |
Ops/sec |
Object |
var myObject = new Object(); myObject.name = "Nicholas"; myObject.count = 50; myObject.flag = true; myObject.pointer = null;
|
pending… |
Literal |
// create an object var myObject = { name: "Nicholas", count: 50, flag: true, pointer: null };
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
Compare results of other browsers
0 comments