JSON.parse vs String.split (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script>
  var str = "one,two,three,four,dskjaflkjadsfkljasdfjalsfdjsaldjfalksjdflkasjdfklajsdfkjasfdjalksfdjklasjdflkajsdfklasdf";
  var arr = str.split(",");

  var jsonstr = JSON.stringify(arr);
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
JSON
var result = JSON.parse(jsonstr);
ready
Split()
var result = str.split(",");
ready

Revisions

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