String.fromCharCode vs TextDecoderFastest: String.fromCharCode (1.1x faster)
3,509,007 ops/sec
3,113,405 ops/sec
Fastest: TextDecoder (1.9x faster)
6,389,780 ops/sec
3,408,678 ops/sec
Fastest: String.fromCharCode (1.3x faster)
3,033,856 ops/sec
2,397,138 ops/sec
Fastest: TextDecoder (1.3x faster)
3,605,730 ops/sec
2,794,995 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| String.fromCharCode | |
| TextDecoder |
| Test name | Executions per second |
|---|---|
| ✓ String.fromCharCode | 8,118,327 Ops/sec |
| TextDecoder | 7,104,510 Ops/sec |