Script Preparation code:
AخA
 
var str = '124sadf96192586sdf1925asdf69asdf12569qewtq81zxcv25';
var r1 = /\D/g;
var r2 = /\D+/g;
Tests:
  • r1

     
    str.replace(r1, '');
  • r2

     
    str.replace(r2, '');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    r1
    r2

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 8 years ago)
Mozilla/5.0 (iPad; CPU OS 10_0_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Mobile/14A403 Safari/602.1
Mobile Safari 10 on iOS 10.0.1
View result in a separate tab
Test name Executions per second
r1 1532247.9 Ops/sec
r2 2025161.5 Ops/sec