Exercise 14 | Index << >> |
Run some benchmarks on ⍳ on 4-byte integers, 4-column matrices of letters of the alphabet, and 32-column boolean matrices. i ← ?1e6⍴2e9 a ← ⎕ucs ⍉(4⍴256)⊤i b ← ⍉(32⍴2)⊤i cmpx 'i⍳i' 'a⍳a' 'b⍳b' i⍳i → 1.38e¯1 | 0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕ a⍳a → 2.37e¯1 | +71% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕ b⍳b → 2.49e¯1 | +80% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕ |