Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
bitwise vs string compare
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/126.0.0.0 Safari/537.36
Browser:
Chrome 126
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
bitwise
209.9M/s
typeof array
83.8M/s
View exact numbers
Test name
Executions per second
✓
bitwise
209,946,496 Ops/sec
typeof array
83,778,208 Ops/sec
Tests:
bitwise
const a = 63 if (a ^ 1) {}; if (a ^ 2) {}; if (a ^ 4) {}; if (a ^ 8) {}; if (a ^ 16) {}; if (a ^ 32) {};
typeof array
const a = [{type: 'add'}, {type: 'remove'}, {type: 'move'}, {type: 'attribute'}, {type: 'reference'}, {type: 'children'}]; a.forEach(v => { if (v.type === 'add'){}; if (v.type === 'remove'){}; if (v.type === 'move'){}; if (v.type === 'attribute'){}; if (v.type === 'reference'){}; if (v.type === 'children'){}; });