Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
check Replace on number format
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Browser:
Chrome 121
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
test one
4143476.8 Ops/sec
test two
3339948.2 Ops/sec
Tests:
test one
function printFloatFormato0( value, precisione) { // formato 1,234.56 / F° return Number.parseFloat(value).toFixed( precisione).toString(); } printFloatFormato0(10.55, 1);
test two
function printFloatFormato1( value, precisione) { // formato 1.234,56 / C° return Number.parseFloat(value).toFixed( precisione).toString().replace('.',','); } printFloatFormato1(10.55, 1);