Help / Release / J 5.04 / i.<./ Improved

From J Wiki
Jump to navigation Jump to search


>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help Release



i.<./ Improved

initial writing: 2004-11-02
last updated: 2005-02-11


The following monads on integer or floating point lists are now implemented by special code:

i.<./     index where the minimum  first occurs
i.>./     index where the maximum first occurs
i:<./     index where the minimum  last occurs
i:>./     index where the maximum last occurs

The following benchmarks demonstrate the improvement:


i=: 1e6 ?@$ 2e9
d=: 1e6 ?@$ 0
ts=: 6!:2 , 7!:2@]   NB. time and space
ts 'Expr'
Expr    J 5.04    J 5.03    Ratio
(i.<./)i 0.00244686   1216 0.00791307   1280 3.23   1.05
(i.<./)d 0.00353955   1216 0.02330960   1280 6.56   1.05




>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help Release