Yes, on arguments with a million fixed width integer elements, the change winds up being about 12 times faster (and uses twice as much memory).
Of course, you could also have deduced the improvement (and you did). Then again, for the example you presented here, you might gain a microsecond. It takes me longer than that just to hit the return key. -- Raul On Fri, Mar 16, 2018 at 8:12 PM, David Lambert <[email protected]> wrote: > Seems that it's possible in some cases that the interpreter could look ahead > a bit and change, well, here's my example, I just answered a quora question > involving arithmetic with an asterisk operator to be determined (if the > first three what is 2*6) > > 3 4 5 6 *&>: 2 3 4 2 > 12 20 30 21 > > Anyway, as I understand it, 3 4 5 6 *&:>: 2 3 4 2 would have been faster. > And j could have deduced the improvement. For some length vectors would > have been faster. > > This is a potential opportunity. > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
