Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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
Benchmark engine:
Benchmark.js
string len
71.6M/s
log10
45.1M/s
View exact numbers
Test name
Executions per second
✓
string len
71,617,704 Ops/sec
log10
45,127,784 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;