String.fromCharCode vs TextDecoderFastest: String.fromCharCode (1.5x faster)
4,952,214 ops/sec
3,328,756 ops/sec
Fastest: TextDecoder (2.0x faster)
6,712,318 ops/sec
3,409,717 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 |
|---|---|
| ✓ TextDecoder | 9,080,975 Ops/sec |
| String.fromCharCode | 5,493,561 Ops/sec |