Why are these so different in execution speed? I'm surprised assembling that linking boxes makes that much of a difference over an number. I need it to be boxed because I'm going to something more complex with each iteration.
f1 =: 3 : '(>: each)^:(<y) (<0)' (6!:2) 'f1 100' 6.01622e_5 (6!:2) 'f1 1000' 0.0012719 (6!:2) 'f1 10000' 0.145702 (6!:2) 'f1 100000' 33.0624 f2 =: 3 : '(>:)^:(<y) (0)' (6!:2) 'f2 100' 4.24675e_5 (6!:2) 'f2 1000' 0.000189688 (6!:2) 'f2 10000' 0.00180487 (6!:2) 'f2 100000' 0.0256836 I'm thinking of using ^: to execute something N times with an increasing argument. I could use i. but wanted to try something different JVERSION Engine: j805/j64/windows Release: commercial/2016-12-11T08:02:16 Library: 8.05.11 Qt IDE: 1.5.3s/5.6.2 Platform: Win 64 Installer: J805 install InstallPath: c:/program files/j64-805 Contact: www.jsoftware.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
