object literal vs json parse (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
object literal
     eval(`
   const obj={a:${Math.random()}, b:${Math.random()}};
   obj.a;
   `);
ready
json parse
 eval(`
    const obj = JSON.parse(
    '{"a":${Math.random()}, "b":${Math.random()}}'
     );
     obj.a;
    `);
ready

Revisions

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