eval vs json.parse1

Benchmark created on


Preparation HTML

<script>
  var r;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
eval
r = eval('({"name":"George", "age":29, "friends":["John", "Sarah", "Albert"]})');
ready
json parse
r = JSON.parse('{"name":"George", "age":29, "friends":["John", "Sarah", "Albert"]}');
ready

Revisions

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

  • Revision 1: published on
  • Revision 2: published by Ben Combee on
  • Revision 3: published by Richard Green on