eval vs new Function vs mathjsFastest: new Function (146.7x faster)
108,980,384 ops/sec
6,647,882 ops/sec
742,732 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| eval | |
| new Function | |
| mathjs |
| Test name | Executions per second |
|---|---|
| ✓ new Function | 241,676,720 Ops/sec |
| eval | 27,518,842 Ops/sec |
| mathjs | 1,251,868 Ops/sec |