Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
IP dotted decimal to number
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 126
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
bitwise shift
5778916.0 Ops/sec
ParseInt
9470362.0 Ops/sec
POW
8453131.0 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const ip = '222.212.77.30';
Tests:
bitwise shift
const octets = ip.split('.').map(Number); return (octets[0] << 24) | (octets[1] << 16) | (octets[2] << 8) | octets[3];
ParseInt
const octets = ip.split('.'); return ( (parseInt(octets[0]) << 24) | (parseInt(octets[1]) << 16) | (parseInt(octets[2]) << 8) | parseInt(octets[3]) );
POW
const octets = ip.split('.'); return ( (parseInt(octets[0]) * Math.pow(256, 3)) + (parseInt(octets[1]) * Math.pow(256, 2)) + (parseInt(octets[2]) * Math.pow(256, 1)) + (parseInt(octets[3]) * Math.pow(256, 0)) );