This expression takes about 40 times longer. The memory allocation is
just slightly lower than for the strawman. It is a tenth of the data
compared to the post below.
ts'(- @ - @ - @ - )i. 10000000'
5.78548 2.6844e8
ts'([: - [: - [: - [: - ])i. 10000000'
0.145299 4.02657e8
/Erling
On 2016-08-04 12:09, Erling Hellenäs wrote:
There is a considerable difference in memory allocation indicating
differences between these expressions. If the first version creates
three copies, the second seems to create five.
ts'([: - [: - [: - [: - ])i. 100000000'
1.45991 3.22123e9
ts'(- @: - @: - @: - )i. 100000000'
1.48942 5.36871e9
3.22123e9*1.67
5.37945e9
There must be some important difference between these versions? What
difference?
/Erling
On 2016-08-04 00:13, Raul Miller wrote:
Yes, or
([: 11&+ _100000&%) 1
Or
11 _100000&p.@:% 1
Meaning exists outside of the language, but the point of the language is to
express concepts (especially some frequently useful concepts from
mathematics).
Thanks,
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm