Script Preparation code:
Tests:

Historical Performance Data aggregated from 48 community runs

Desktop Results:
Chrome 42 runs
map()
15.2M/s
ForLoop
2.1M/s
JSON.stringify()
668K/s

Fastest: map() (22.7x faster)

View exact numbers
  • map(): 15,184,276 ops/sec
  • ForLoop: 2,060,297 ops/sec
  • JSON.stringify(): 667,799 ops/sec
Firefox 6 runs
map()
23.2M/s
ForLoop
20.8M/s
JSON.stringify()
701K/s

Fastest: map() (33.0x faster)

View exact numbers
  • map(): 23,159,902 ops/sec
  • ForLoop: 20,806,914 ops/sec
  • JSON.stringify(): 701,388 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
    map()
    JSON.stringify()
    ForLoop

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 months ago)
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/29.0 Chrome/136.0.0.0 Mobile Safari/537.36
Chrome Mobile 136 on Android
View result in a separate tab
map()
27.1M/s
ForLoop
14.4M/s
JSON.stringify()
661K/s
View exact numbers
Test name Executions per second
map() 27,054,288 Ops/sec
ForLoop 14,369,555 Ops/sec
JSON.stringify() 660,882 Ops/sec