Modern J uses a virtual block for the result of (, y), so now (+/@, y)
and (+/ , y) run at the same speed. A different example is needed.
Henry Rich
On 10/25/2020 12:01 PM, Brian Schott wrote:
Jan-Pieter,
First, thanks for pointing out the link.
But I am having some problems.
[*******my comment 0) here is likely inappropriate in light of Henry's
reply in this thread
0) Are you suggesting that some wording be added to that link? It looks to
me as if you are but where?
I say where because there are at least 3 different concepts treated on that
page: SC, EIP, and AIP.
]
1) I am finding problems on that page that I cannot explain. For example,
a) on one line discussing EIP the following is stated twice, when it is
clear that the two should be different `(V0@[ V1 V2)` .
b) [this comment may also be explained by Henry's reply but I don't see how]
I cannot confirm the improvements suggested by the example there.
Perhaps using j807 is the problem. See my session below.
9!:52''
1
a =: 1000 1000 ?@$ 0 NB. it is unfortunate that the +/ result
suggests that a contains integers, not reals
+/ , a NB. perhaps 1000 1000
could be reduced to 25 25?
499960
+/@, a
499960
ts =: 6!:2 , 7!:2@]
ts '+/ , a' NB. notice the small space usage here
0.001987 1408
ts '+/@, a' NB. the time reduction is so small as to be
"within statistical error"
0.001965 1536
JVERSION
Engine: j807/j64/darwin
Release-c: commercial/2019-02-24T10:50:40
Library: 8.07.26
Platform: Darwin 64
Installer: J807 install
InstallPath: /users/brian/j64-807
Contact: www.jsoftware.com
On Sun, Oct 25, 2020 at 8:42 AM Jan-Pieter Jacobs <
[email protected]> wrote:
I guess this is worth mentioning here:
https://code.jsoftware.com/wiki/Vocabulary/SpecialCombinations#Assignments_In_Place_.28AIP.29
Assignments are done in place if you use a specific form recognised by the
interpreter.
If you do not assign the result, or use it in a longer sentence, it will
not be recognised, copying over the entire array, rather than updating a
single element.
Best regards,
Jan-Pieter
--
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
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