Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Function or if function
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15
Browser:
Safari 15
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
If before function
61.4M/s
function call
50.8M/s
View exact numbers
Test name
Executions per second
✓
If before function
61,432,980 Ops/sec
function call
50,760,796 Ops/sec
Tests:
If before function
const normalize = (v) => { return '0x' + v } let color = '0xffffffff' if(!color.startsWith('0x')) { color = normalize(color) }
function call
const normalize = (v) => { if(v.startsWith('0x')) { return v } else { return '0x' + v } } let color1 = '0xffffffff' color1 = normalize(color1)