Script Preparation code:
AخA
 
var str = '124961925861925691256981625';
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 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Chrome 53 on Mac OS X 10.12.0
View result in a separate tab
Test name Executions per second
r1 2262306.8 Ops/sec
r2 2293358.0 Ops/sec