Script Preparation code:
x
 
var int16 = new Int16Array(100);
var regular = [];
for(var i=0;i<100;i++){
  int16[i] = i;
  regular.push(i);
}
Tests:
  • Int16Array

     
    var sum = 0;
    for(var i=0;i<100;i++){
      sum = sum + int16[i];
    }
  • Plain JS array

     
    var sum = 0;
    for(var i=0;i<100;i++){
      sum = sum + regular[i];
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Int16Array
    Plain JS array

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 13 days ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 18_3_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/136.2 Mobile/15E148 Safari/605.1.15
Mobile Safari 18 on iOS 18.3.2
View result in a separate tab
Test name Executions per second
Int16Array 18292002.0 Ops/sec
Plain JS array 13614179.0 Ops/sec