JSON parse speed (v6)

Revision 6 of this benchmark created by EaterOfCorpses on


Test runner

Ready to run.

Testing in
TestOps/sec
JSON parsed
var v = JSON.parse('[1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0]');
ready
Straight Array
var v = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0];
ready
Longer numbers in array
var v = JSON.parse('[7741,7742,7743,7744,7745,7746,7747,7748,7749,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7740]');
ready
with objects
var v = JSON.parse('{"a1":1,"b1":2,"c1":3,"d1":4,"e1":5,"a2":1,"b2":2,"c2":3,"d2":4,"e2":5,"a3":1,"b3":2,"c3":3,"d3":4,"e3":5,"a4":1,"b4":2,"c4":3,"d4":4,"e4":5,"a5":1,"b5":2,"c5":3,"d5":4,"e5":5,"a6":1,"b6":2,"c6":3,"d6":4,"e6":5,"a7":1,"b7":2,"c7":3,"d7":4,"e7":5,"a8":1,"b8":2,"c8":3,"d8":4,"e8":5,"a9":1,"b9":2,"c9":3,"d9":4,"e9":5,"a0":1,"b0":2,"c0":3,"d0":4,"e0":5}');
ready
eval
var v = eval('[1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0]');
ready
eval objects
var v = eval('_={"a1":1,"b1":2,"c1":3,"d1":4,"e1":5,"a2":1,"b2":2,"c2":3,"d2":4,"e2":5,"a3":1,"b3":2,"c3":3,"d3":4,"e3":5,"a4":1,"b4":2,"c4":3,"d4":4,"e4":5,"a5":1,"b5":2,"c5":3,"d5":4,"e5":5,"a6":1,"b6":2,"c6":3,"d6":4,"e6":5,"a7":1,"b7":2,"c7":3,"d7":4,"e7":5,"a8":1,"b8":2,"c8":3,"d8":4,"e8":5,"a9":1,"b9":2,"c9":3,"d9":4,"e9":5,"a0":1,"b0":2,"c0":3,"d0":4,"e0":5}');
ready

Revisions

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