Help / Release / J 5.03 / u/"r Improved

From J Wiki
Jump to navigation Jump to search


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



u/"r Improved

initial writing: 2003-09-04
last updated: 2004-10-26


u/"r y where r>0 and 2=(-r){$y (insert over an axis of length 2) is now faster for the following combinations:

 Verb u   Rank r   Argument Type
 = ~:   any   literal
 = ~: < <: > >:  any   integer, floating point
 = ~: < <: > >:
<. >. +. +: * *. *:
  1   Boolean

The following benchmarks demonstrate the improvement:

i1=: ?1e6 2$1e6
i3=: ?1000 2 10 100$1e6
d1=: o. i1
d3=: o. i3
c1=: a.{~?1e6 2$256
c3=: a.{~?1000 2 10 100$256
b1=: ?10 1e5 2$2

ts=: 6!:2 , 7!:2@]
ts 'Expression'
Expression    J 5.03   J 5.02   Ratio
</"1 i1  0.035357 1.049856e6 3.409647 1.050240e6 96.43 1.00
</"1 d1  0.150371 1.049856e6 3.591794 1.050240e6 23.89 1.00
</"3 i3  0.040242 1.049792e6 0.071851 1.070336e6  1.79 1.02
</"3 d3  0.138132 1.049792e6 0.188177 1.086720e6  1.36 1.04
 
=/"1 i1  0.035739 1.049856e6 3.493348 1.050240e6 97.75 1.00
=/"1 d1  0.172347 1.049856e6 3.612539 1.050240e6 20.96 1.00
=/"3 i3  0.040809 1.049792e6 0.060829 1.070336e6  1.49 1.02
=/"3 d3  0.147929 1.049792e6 0.195685 1.086720e6  1.32 1.04
 
=/"1 c1  0.018211 1.049856e6 3.401312 1.050240e6 186.77 1.00
=/"3 c3  0.020371 1.049792e6 0.029415 1.062144e6  1.44 1.01
 
= /"1 b1  0.014215 1.049856e6 0.050325 1.049856e6 3.54 1.00
~:/"1 b1  0.014147 1.049856e6 0.038562 1.049856e6 2.73 1.00
< /"1 b1  0.014595 1.049856e6 0.054640 1.049856e6 3.74 1.00
+./"1 b1  0.014129 1.049856e6 0.062113 1.049856e6 4.40 1.00



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