object literal vs array literal

Benchmark created on


Setup

class Foo {}


const objectLiteral = ()=>({Foo, bar: Foo});
const arrayLiteral = ()=>[Foo, Foo];

Test runner

Ready to run.

Testing in
TestOps/sec
object
objectLiteral();

1;
ready
array
arrayLiteral();
2;
ready

Revisions

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