immer vs shallow copy vs ramda lens vs Immutable js test vs immutable js (toJS) vs mutateFastest: mutate (136.5x faster)
4,050,607 ops/sec
1,915,043 ops/sec
1,371,731 ops/sec
117,849 ops/sec
42,685 ops/sec
29,679 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| immer | |
| shallow copy | |
| ramda lens | |
| Immutable js test | |
| immutable js (toJS) | |
| mutate |
| Test name | Executions per second |
|---|---|
| ✓ mutate | 36,284,456 Ops/sec |
| Immutable js test | 1,067,374 Ops/sec |
| shallow copy | 289,050 Ops/sec |
| ramda lens | 128,474 Ops/sec |
| immutable js (toJS) | 35,950 Ops/sec |
| immer | 23,083 Ops/sec |