Help / Release / J 6.02 / { Improved

From J Wiki
Jump to navigation Jump to search


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



{ Improved

initial writing: 2006-11-10
last updated: 2007-01-24


The dyad { on integer indices has been made faster and leaner. The following benchmarks demonstrate the improvement:

y=: a.{~ (1000,c)?@$ 256
i=: 1e6 ?@$ #y

ts=: 6!:2 , 7!:2@]  NB. time and space
ts 'i{y'
c    J 6.02    J 6.01    Ratio
1  0.00402030 1.04922e6 0.01261339 5.24352e6 3.14 5.00
2  0.00424856 2.09779e6 0.01337689 6.29210e6 3.15 3.00
3  0.01599239 4.19494e6 0.02803569 8.38925e6 1.75 2.00
4  0.00714082 4.19494e6 0.01643338 8.38925e6 2.30 2.00
5  0.01880818 8.38925e6 0.03039327 1.25836e7 1.62 1.50
6  0.01349971 8.38925e6 0.03606668 1.25836e7 2.67 1.50
7  0.02171499 8.38925e6 0.03826382 1.25836e7 1.76 1.50
8  0.01398362 8.38925e6 0.02500564 1.25836e7 1.79 1.50
9  0.02987036 1.67779e7 0.04087507 2.09722e7 1.37 1.25
10 0.02536594 1.67779e7 0.04197008 2.09722e7 1.65 1.25



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