Help / Release / J 4.05 / 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: 2000-00-00
last updated: 2004-10-21


The phrase f/@, is now supported by special code, for dense as well as sparse arrays. (Previously, it was supported by special code for sparse arrays only.) A time-space comparison is as follows:

   ts=: 6!:2 , 7!:2@]        NB. time-space

   x=: o. ?11 13 17 61$1000  NB. dense array
   s=: $. x * 0=?($x)$10     NB. sparse array with density of 0.1

J 4.05

   ts '+/@, x'
0.00631756 2688
   ts '>./@, x'
0.00842537 2688

   ts '+/@, s'
0.000160914 1728
   ts '>./@, s'
0.000274057 1728

J 4.04

   ts '+/@, x'
0.0133911 2.09888e6
   ts '>./@, x'
0.0170284 2.09888e6

   ts '+/@, s'
0.000164267 1792
   ts '>./@, s'
0.000271543 1792



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