angular.copy() vs JSON.parse(JSON.stringify())Fastest: angular.copy() (1.6x faster)
1,510,370 ops/sec
947,797 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| angular.copy() | |
| JSON.parse(JSON.stringify()) |
| Test name | Executions per second |
|---|---|
| ✓ angular.copy() | 1,691,479 Ops/sec |
| JSON.parse(JSON.stringify()) | 1,345,130 Ops/sec |