Script Preparation code:
AخA
 
var newFunc = new Function("let r = Math.random().toString(36).substring(7).includes('x');");
Tests:
  • eval

     
    eval("let r = Math.random().toString(36).substring(7).includes('x');");
  • new Function

     
    newFunc();
  • func

     
    let r = Math.random().toString(36).substring(7).includes('x');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    eval
    new Function
    func

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
eval 3129476.8 Ops/sec
new Function 4751857.0 Ops/sec
func 4726098.5 Ops/sec