Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0
Firefox 142
Linux
Desktop
6 months ago
Test name Executions per second
toString number 893639808.0 Ops/sec
JSON.stringify number 11481098.0 Ops/sec
toString undefined 1049377536.0 Ops/sec
JSON.stringify undefined 13793330.0 Ops/sec
toString array 4217432.5 Ops/sec
JSON.stringify array 2302558.2 Ops/sec
Script Preparation code:
Tests:
  • toString number

  • JSON.stringify number

  • toString undefined

  • JSON.stringify undefined

  • toString array

  • JSON.stringify array