Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36 Edg/135.0.0.0
Chrome 135
Windows
Desktop
one year ago
substring and substring
8.6M/s
replace inline regex
7.4M/s
View exact numbers
Test name Executions per second
substring and substring 8,648,230 Ops/sec
replace inline regex 7,361,394 Ops/sec
Script Preparation code:
Tests: