native vs typed js array speed (v20)

Revision 20 of this benchmark created by william on


Preparation HTML

<script>
  var arraySize = 1000;
  
  var typedArray = new Int32Array(new ArrayBuffer(arraySize));
  var nativeArray = new Array(arraySize);
</script>

Setup

var sum = 0;

Test runner

Ready to run.

Testing in
TestOps/sec
Native
nativeArray[3] = 3;
nativeArray[3];
ready
Typed
typedArray[3] = 3;
typedArray[3];

ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.