eval vs new Function call

4 years ago
User agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Test name Executions per second
eval 2231763.0 Ops/sec
new Function 887638.3 Ops/sec
Tests:
  • eval

  • new Function

Open this result on MeasureThat.net