Help / Release / J 6.01 / f/@:g Improved
< Help
Jump to navigation
Jump to search
>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help Release
f/@:g Improved |
initial writing: 2006-05-11 |
The dyad x f/@:g y (also [: f/ g ) is now supported by special code for atomic verbs f and g , with further optimizations for +/@:g . Time improved by a factor of 1.5 to 4; space improved from O(*/$x) to O(*/}.$x) . The following benchmarks illustrate the improvement:
xx=: 1000 10 100 ?@$ 0 yy=: 1000 10 100 ?@$ 0 zz=: 1000 10 ?@$ 0 b=: 10000 96 ?@$ 2 c=: 10000 96 ?@$ 2 p=: 96 10000 ?@$ 2 q=: 96 10000 ?@$ 2 ts=: 6!:2 , 7!:2@] ts 'Expression'
Expression | J 6.01 | J 5.04 | Ratio | |||||||||
xx +/@:* yy | 0.00783861 | 9536 | 0.02374443 | 8398144 | 3.03 | 880.68 | ||||||
xx +/@:* zz | 0.00429688 | 9536 | 0.01484349 | 8398144 | 3.45 | 880.68 | ||||||
xx >./@:* yy | 0.01087503 | 17728 | 0.02459718 | 8398144 | 2.26 | 473.72 | ||||||
xx >./@:* zz | 0.00808532 | 17728 | 0.01606883 | 8398144 | 1.99 | 473.72 | ||||||
b +/@:*. c | 0.00081321 | 1984 | 0.00253429 | 1050560 | 3.12 | 529.52 | ||||||
p +/@:*. q | 0.00090042 | 83136 | 0.00259604 | 1131712 | 2.88 | 13.61 | ||||||
b ~:/@:> c | 0.00253506 | 1728 | 0.00277456 | 1050048 | 1.09 | 607.67 | ||||||
p ~:/@:> q | 0.00132367 | 33984 | 0.00270656 | 1066176 | 2.04 | 31.37 |