Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
log10 vs string len
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 14; Mobile; rv:136.0) Gecko/136.0 Firefox/136.0
Browser:
Firefox Mobile 136
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
log10
45127784.0 Ops/sec
string len
71617704.0 Ops/sec
Script Preparation code:
var a = 123456; var b = 1; var c = 123456.0132456; var d = 1
Tests:
log10
Math.floor(Math.log10(a)); Math.floor(Math.log10(b)); Math.floor(Math.log10(c)); Math.floor(Math.log10(d));
string len
a.toString().length; b.toString().length; c.toString().length; d.toString().length;