Help / Release / J 6.01 / Boxed Array References Improved

From J Wiki
Jump to navigation Jump to search


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



Boxed Array References Improved

initial writing: 2005-07-22
last updated: 2006-02-02


Previously, referencing a boxed array x took time proportional to the number of subarrays in x . J 6.01 fixes this performance bug so that referencing a boxed array takes constant time. The following benchmarks demonstrate the improvement:

x=: 1e6 $ <123
y=: 10 $ < 1e5 $ <123
ts=: 6!:2 , 7!:2@]  NB. time and space
ts 'Expression'
Expression      J 6.01    J 5.04    Ratio
#x 2.30611e_6 640 0.0318275 640 13801 1.00
#y 2.22213e_6 640 0.0311371 640 14012 1.00



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