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

(2;a)$.y and $. y Improved initial writing: 2007-01-29
last updated: 2007-02-01

(2;a)$.y and $.y (equivalent to (2;i.#$y)$.y ) have been more efficient, in particular for matrix or boolean y . The following benchmarks demonstrate the improvement:

b2=:      1e5 10 ?@$ 2
x2=: b2 * 1e5 10 ?@$ 0
b3=:      313 317 11 ?@$ 2
x3=: b3 * 313 317 11 ?@$ 0

ts=: 6!:2 , 7!:2@]  NB. time and space
ts 'Expression'
Expression      J 6.02    J 6.01    Ratio
$.b2  0.0274254 4.72032e6 0.0799200 1.52066e7  2.91  3.22
$.x2  0.0670972 1.04876e7 0.1179362 3.35567e7  1.76  3.20
$.b3  0.0569772 9.43891e6 0.1119333 3.04109e7  1.96  3.22
$.x3  0.0941701 2.09733e7 0.1662019 6.71111e7  1.76  3.20
(2;0 1)$.b3 0.0105079 5.50778e6 0.0185355 8.65350e6  1.76  1.57
(2;0 1)$.x3 0.0404309 3.48680e7 0.0631660 5.26938e7  1.56  1.51



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