toString vs JSON.stringifyFastest: JSON.stringify (1.3x faster)
11,806 ops/sec
8,846 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| toString | |
| JSON.stringify |
| Test name | Executions per second |
|---|---|
| ✓ toString | 14,481 Ops/sec |
| JSON.stringify | 13,797 Ops/sec |