The performance argument aside, I have come to think that perhaps it is better
not to use " when another formulation is possible. (See, in part, my posting
from a few months ago on |:, and a message from bob smith ca 2 years ago on
comp.lang.apl.). That said, I don't love the triple boxing in { and } either...
On Thu, 28 Apr 2022, Raul Miller wrote:
Why is the more complicated form faster?
Thanks,
--
Raul
On Thu, Apr 28, 2022 at 6:20 PM Henry Rich <[email protected]> wrote:
Gagging the critic, eh? It's just trying to help:
r =. i. 3 4000
l =. i. 3 2
7!:2 'r =. l 1 2}"1 r'
165696
7!:2 'r =. l (<a:;1 2)} r'
1856
Henry Rich
On 4/28/2022 6:08 PM, 'Michael Day' via Beta wrote:
> I've just encountered this rather surprising instance of the error
> message.
>
> (i.3 2) 1 2}"1 i.3 4
> (004) m}"n should be executed without " using leading axes of a: in m
> 0 0 1 3
> 4 2 3 7
> 8 4 5 11
>
> However, this works without any grumbling:
> 1 2{"1 i.3 4
> 1 2
> 5 6
> 9 10
>
> This is an example I've cooked up for this report; the actual line of
> code
> is slightly more interesting: I'm trying to replace some columns in an
> matrix with new values. Actually it's Fannkuch -flipping the first few
> columns! I was looking at my code after yesterday's post re fannkuch
> redux.
>
> I've killed the message now, with 9!:55 ] 1e6 ; 4
>
> JVERSION
> Engine: j904/j64avx2/windows
> Beta-b: commercial/2022-04-12T18:59:13
> Library: 9.04.01
> Qt IDE: 2.0.3/6.2.4(6.2.4)
> Platform: Win 64
> Installer: J904 install
> InstallPath: c:/d/j904-beta
> Contact: www.jsoftware.com
>
> Thanks,
>
> Mike
>
--
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm