Run details:
Mozilla/5.0 (Linux; Android 10; SM-G965F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36
Chrome Mobile 102
Android
Mobile
2 years ago
Test name Executions per second
toString 2931043.2 Ops/sec
JSON.stringify 302454.7 Ops/sec
Script Preparation code:
AخA
 
function makeTestData() { return { name: "Matheus de Sousa Martins", age: 30, phone: "999999999999" }; }
Tests:
  • toString

     
    makeTestData().toString()
  • JSON.stringify

     
    JSON.stringify(makeTestData());