Help / Release / J 5.03 / [: +./ < Improved

From J Wiki
Jump to navigation Jump to search


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



[: +./ < Improved

initial writing: 2003-06-20
last updated: 2004-10-21


The following dyads are now supported by special code for

Boolean, integer, floating point, literal, or symbol vectors or scalars:

   [: +./ comp         +./@:comp
   [: *./ comp   *./@:comp
   [: I.  comp    I.@:comp

where comp is one of = ~: < <: >: > E. (< <: >: > not available for literal). These are similar to the special code for comp i. 1: etc. for J5.02.

Time and space savings depend on the arguments used. For example:

   ts=: 6!:2 , 7!:2@]   NB. time and space
   x=: ?1e6$1e9
   y=: 1.5e9

   ts '+./x>y'
0.0322982 1.04973e6
   ts 'x ([: +./ >) y'  NB. scan entire x
0.0181442 1408
   
   ts '*./x>y'
0.0246665 1.04973e6
   ts 'x ([: *./ >) y'  NB. immediate hit
2.23492e_5 1408




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