Calculation v Look-Up

(⎕io←0 and timings are done in Dyalog version 15.0.) Table Look-Up Some functions can be computed faster by table look-up than a more traditional and more conventional calculation. For example: b←?1e6⍴2 cmpx ‘*b’ ‘(*0 1)[b]’ *b → 1.32E¯2 | 0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕ (*0 1)[b] → 1.23E¯3 | -91% ⎕⎕⎕ Some observations about this benchmark: (a) The […]