Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
str.charAt(0).toLowerCase() vs str.toLowerCase()
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Browser:
Chrome 137
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
toLowerCase()
131.6M/s
str.charAt(0).toLowerCase()
74.3M/s
View exact numbers
Test name
Executions per second
✓
toLowerCase()
131,607,240 Ops/sec
str.charAt(0).toLowerCase()
74,344,128 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
var str = 'myTestWord'
Tests:
str.charAt(0).toLowerCase()
str.charAt(2).toLowerCase() + str.slice(3);
toLowerCase()
str.slice(2,3).toLowerCase() + str.slice(3);
regExp
str.replace(/my(.)/, (s1, s2) => { return s2.toLowerCase()})