|
|
|
|
|
by klibertp
1859 days ago
|
|
Unfortunately, I have no idea about the implementation and what optimizations are done in J or APL for which operations :( I know that there are hardcoded "fast path" expressions (particular combinations of operations) which have much better performance than more general expressions doing the same thing, so it might be that the optimization happens at that level. OTOH, your example is very verbose when compared to J's version: 1 2 3 * 10
10 20 30
Plus, in J it generalizes to higher dimensional arrays: i. 3 3
0 1 2
3 4 5
6 7 8
(1 + i. 3 3) * 10
10 20 30
40 50 60
70 80 90
|
|