Help / Release / J 6.02 / m b./\ Improved

From J Wiki
Jump to navigation Jump to search


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



m b./\

Improved

initial writing: 2007-12-19
last updated: 2007-12-19


The dyads m b./\ for atomic m e. 17 22 23 25 on integer arguments (that is, bitwise and, xor, or, and equal) have been made more efficient. The following benchmarks demonstrate the improvements.

i =: _1e9 + 1e5   ?@$ 2e9
i3=: _1e9 + 1e5 3 ?@$ 2e9

ts=: 6!:2 , 7!:2@]  NB. time and space
ts 'Expression'
Expression       J 6.02    J 6.01    Ratio
4  (17 b.)/\ i  0.000632 5.25888e5 0.066650 2.09939e6 105.48 3.99
19 (22 b.)/\ i  0.000635 5.25824e5 0.050669 2.09926e6  79.84 3.99
4  (23 b.)/\ i3 0.001898 2.09882e6 0.074529 5.24512e6  39.26 2.50
19 (25 b.)/\ i3 0.001840 2.09875e6 0.060254 5.24512e6  32.74 2.50



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