Script Preparation code:
x
 
var r32arr = new Uint8Array(32).map(() => Math.floor(Math.random() * 256));
var mil32arr = Array.from({ length: 10_000_000 }, () => new Uint8Array(32).map(() => Math.floor(Math.random() * 256)));
var r96arr = new Uint8Array(96).map(() => Math.floor(Math.random() * 256));
var mil96arr = Array.from({ length: 10_000_000 }, () => new Uint8Array(96).map(() => Math.floor(Math.random() * 256)));
var r160arr = new Uint8Array(160).map(() => Math.floor(Math.random() * 256));
var mil160arr = Array.from({ length: 10_000_000 }, () => new Uint8Array(160).map(() => Math.floor(Math.random() * 256)));
Tests:
  • 1 or 0 out of 10 million 32 byte arrays

     
    const b = mil32arr.some(arr => arr.every((value, index) => value === r32arr[index]));
  • 1 or 0 out of 10 million 96 byte arrays

     
    const b = mil96arr.some(arr => arr.every((value, index) => value === r96arr[index]));
  • 1 or 0 out of 10 million 160byte arrays

     
    const b = mil160arr.some(arr => arr.every((value, index) => value === r160arr[index]));
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    1 or 0 out of 10 million 32 byte arrays
    1 or 0 out of 10 million 96 byte arrays
    1 or 0 out of 10 million 160byte arrays

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 9 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0
Firefox 129 on Windows
View result in a separate tab
Test name Executions per second
1 or 0 out of 10 million 32 byte arrays 3.4 Ops/sec
1 or 0 out of 10 million 96 byte arrays 1.3 Ops/sec
1 or 0 out of 10 million 160byte arrays 0.8 Ops/sec