The reduction ∨/
transforms each row into 0 if it contains only zeros and 1 otherwise.
The comparison 0≠
transforms each integer into 0 if its binary representation contains only zeros and 1 otherwise.
b←1=?1e6 16⍴24 ⍝ 1e6 rows. About half have a 1. i←(⊢⊣⎕DR)2⊥⍉b×⍤1⊢¯1*16↑1 ⍝ Two's complement conversion. cmpx '∨/b' '0≠i' ∨/b → 5.3E¯5 | 0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕ 0≠i → 5.0E¯5 | -6% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
To handle rows whose length doesn't match an integer size (1, 2, or 4 bytes), we read an 8-byte value at an offset and mask off unwanted bytes.