Help / Release / J 5.04 / /:@/: Improved
< Help
Jump to navigation
Jump to search
>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help Release
/:@/: Improved |
initial writing: 2004-05-19 |
The monads /:@/: (which computes ranking) and /:@/:"r are now implemented by special code. The following benchmarks illustrate the improvements in time and space:
ts=: 6!:2 , 7!:2@] NB. time and space ts '/:@/:x'
x | J 5.04 | J 5.03 | Ratio | |||
1e6 1 ?@$ 2 | 0.036380 4.195072e6 | 0.258304 1.258368e7 | 7.10 3.00 | |||
1e6 2 ?@$ 2 | 0.076345 4.195072e6 | 0.401466 1.258368e7 | 5.26 3.00 | |||
1e6 3 ?@$ 2 | 0.226128 8.389376e6 | 0.520508 1.258368e7 | 2.30 1.50 | |||
1e6 4 ?@$ 2 | 0.134970 4.195072e6 | 0.600956 1.258368e7 | 4.45 3.00 | |||
1e6 5 ?@$ 2 | 0.508242 8.389376e6 | 0.857384 1.258368e7 | 1.69 1.50 | |||
a.{~1e6 1 ?@$ #a. | 0.042595 4.197120e6 | 0.567743 1.258368e7 | 13.33 3.00 | |||
a.{~1e6 2 ?@$ #a. | 0.119103 4.719360e6 | 0.814606 1.258368e7 | 6.84 2.67 | |||
a.{~1e6 3 ?@$ #a. | 0.698069 8.389376e6 | 1.099157 1.258368e7 | 1.57 1.50 | |||
a.{~1e6 4 ?@$ #a. | 1.019201 8.389376e6 | 1.388238 1.258368e7 | 1.36 1.50 | |||
a.{~1e6 5 ?@$ #a. | 1.257346 8.389376e6 | 1.678288 1.258368e7 | 1.33 1.50 | |||
1e6 ?@$ 1e2 | 0.101135 4.195584e6 | 0.624041 1.258368e7 | 6.17 3.00 | |||
1e6 ?@$ 1e4 | 0.116228 4.260608e6 | 0.714883 1.258368e7 | 6.15 2.95 | |||
1e6 ?@$ 1e6 | 0.461045 8.389376e6 | 1.146183 1.258368e7 | 2.49 1.50 | |||
1e6 ?@$ 1e8 | 0.806820 8.913664e6 | 1.194081 1.258368e7 | 1.48 1.41 | |||
1e6 ?@$ 0 | 1.840385 8.913664e6 | 2.239712 1.258368e7 | 1.22 1.41 |