Help / Release / J 6.02 / f/\. Improved

From J Wiki
Jump to navigation Jump to search


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



f/\.

Improved

initial writing: 2007-12-13
last updated: 2007-12-19


The dyad f/\. have been made more efficient for atomic associative f . The following benchmarks demonstrate the improvements.

y=: 1e4 ?@$ 0
b=: 1e4 ?@$ 2
i=: 1e4 ?@$ 2e9
ts=: 6!:2 , 7!:2@]  NB. time and space
ts 'Expression'
Expression       J 6.02    J 6.01    Ratio
1 + /\. y  0.000267 2.64320e5 0.820775 1.34662e8 3073.30  509.47
9 + /\. y  0.000273 2.64256e5 0.744331 1.34662e8 2723.45  509.59
1 >./\. y  0.000905 9.19104e5 0.889777 1.34662e8  983.09  146.51
9 >./\. y  0.000863 9.19040e5 0.842805 1.34662e8  976.79  146.52
1 ~:/\. b  0.000354 3.49440e4 0.447482 1.34318e8 1263.90 3843.80
9 ~:/\. b  0.000352 3.48800e4 0.428853 1.34318e8 1220.03 3850.85
1 (22 b.)/\. i 0.000208 1.32864e5 0.567424 1.34466e8 2721.59 1012.05
9 (22 b.)/\. i 0.000201 1.32800e5 0.543066 1.34466e8 2704.64 1012.54



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