Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
parseInt vs ~~
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Browser:
Chrome 149
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 months ago
Benchmark engine:
Benchmark.js
~~
250.5M/s
parserInt
249.5M/s
View exact numbers
Test name
Executions per second
✓
~~
250,450,320 Ops/sec
parserInt
249,467,744 Ops/sec
HTML Preparation code:
<div id=''></div>
Script Preparation code:
var baseStr = '23';
Tests:
parserInt
const a = parseInt(baseStr)
~~
const b = ~~(baseStr)