Script Preparation code:
AخA
 
var funcFunctionStr = "return 2 * 3";
var funcStr = "2 * 3";
Tests:
  • eval

     
    eval(funcStr);
  • new Function

     
    new Function(funcStr)();
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    eval
    new Function

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0
Firefox 76 on Ubuntu
View result in a separate tab
Test name Executions per second
eval 2218694.2 Ops/sec
new Function 101048.4 Ops/sec