Script Preparation code:
Tests:

Historical Performance Data aggregated from 65 community runs

Desktop Results:
Safari 41 runs
JSON.parse()
2.8M/s
eval()
1.6M/s

Fastest: JSON.parse() (1.7x faster)

View exact numbers
  • JSON.parse(): 2,817,690 ops/sec
  • eval(): 1,610,656 ops/sec
Chrome 24 runs
JSON.parse()
6.0M/s
eval()
2.8M/s

Fastest: JSON.parse() (2.1x faster)

View exact numbers
  • JSON.parse(): 5,989,886 ops/sec
  • eval(): 2,794,544 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    JSON.parse()
    eval()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:152.0) Gecko/20100101 Firefox/152.0
Firefox 152 on Windows
View result in a separate tab
JSON.parse()
2.7M/s
eval()
92K/s
View exact numbers
Test name Executions per second
JSON.parse() 2,734,574 Ops/sec
eval() 92,394 Ops/sec