Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
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/140.0.0.0 Safari/537.36
Browser:
Chrome 140
Operating system:
Windows
Device Platform:
Desktop
Date tested:
7 months ago
Test name
Executions per second
bitwise
105899952.0 Ops/sec
typeof array
34892064.0 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'){}; });