Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
ArrayBuffer.isView vs instanceof
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser:
Chrome 135
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
ArrayBuffer.isView true
162434960.0 Ops/sec
instanceof true
167351552.0 Ops/sec
ArrayBuffer.isView false
154382576.0 Ops/sec
instanceof false
107886712.0 Ops/sec
HTML Preparation code:
<script> const buffer = crypto.getRandomValues(new Uint8Array(10)) const nobuffer = [...Array(10).keys()] </script>
Tests:
ArrayBuffer.isView true
ArrayBuffer.isView(buffer)
instanceof true
buffer instanceof Uint8Array
ArrayBuffer.isView false
ArrayBuffer.isView(nobuffer)
instanceof false
nobuffer instanceof Uint8Array