t1 (v3)

Revision 3 of this benchmark created on


Setup

const data = new Uint8ClampedArray(100 * 100 * 4);
data.fill(255);

function anyNonWhite() {
  for (let t = 0; t < data.length; t += 4) {
    let a = data[t],
      n = data[t + 1],
      r = data[t + 2];
    if (255 !== a || 255 !== n || 255 !== r) return !0
  }
  return !1
}

Test runner

Ready to run.

Testing in
TestOps/sec
some
anyNonWhite()
ready
121212
anyNonWhite()
ready

Revisions

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