Help / Release / J 5.03 / u/\ Improved

From J Wiki
Jump to navigation Jump to search


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



u/\ Improved

initial writing: 2003-12-04
last updated: 2005-01-20


The dyad m u/\ y is now implemented by special code for the cases where m is a positive integer and:

+ /\  boolean, integer or floating point y
>./\ boolean, integer or floating point y
<./\ boolean, integer or floating point y
+./\  boolean y
*./\  boolean y
= /\  boolean y
~:/\  boolean y

The following table illustrates the improvements in time and space.

b=: ?5e5$2
i=: ?5e5$1e6
d=: 0.01*?5e5$1e6
ts=: 6!:2 , 7!:2@]
ts 'Expression'
Expression    J 5.03   J 5.02   Ratio
50 + /\ b 0.014285 2.098368e6  1.140392 6.817536e6  79.83 3.25
100 + /\ b 0.014728 2.098368e6  1.211342 6.817664e6  82.25 3.25
150 + /\ b 0.014975 2.098368e6  1.294418 6.817664e6  86.44 3.25
50 + /\ i 0.032687 2.098368e6  1.468416 8.390528e6  44.92 4.00
100 + /\ i 0.035122 2.098368e6  1.769516 8.390784e6  50.38 4.00
150 + /\ i 0.030545 2.098368e6  2.108809 8.391296e6  69.04 4.00
50 + /\ d 0.035560 4.195520e6  1.387645 1.258509e7  39.02 3.00
100 + /\ d 0.035114 4.195520e6  1.583527 1.258560e7  45.10 3.00
150 + /\ d 0.034200 4.195520e6  2.189876 1.258662e7  64.03 3.00
50 >./\ i 0.027954 2.098368e6  1.381496 8.390528e6  49.42 4.00
100 >./\ i 0.027844 2.098368e6  1.586821 8.390784e6  56.99 4.00
150 >./\ i 0.031460 2.098368e6  1.818133 8.391296e6  57.79 4.00
50 >./\ d 0.058007 4.195520e6  1.540447 1.258509e7  26.56 3.00
100 >./\ d 0.047901 4.195520e6  1.855978 1.258560e7  38.75 3.00
150 >./\ d 0.057408 4.195520e6  2.584069 1.258662e7  45.01 3.00
50 +./\ b 0.023684 5.255040e5  1.081159 5.244672e6  45.65 9.98
50 *./\ b 0.022626 5.255040e5  1.083555 5.244672e6  47.89 9.98
50 = /\ b 0.022044 5.255040e5  1.094156 5.244672e6  49.64 9.98
50 ~:/\ b 0.013014 5.255040e5  1.074636 5.244672e6  82.58 9.98




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