Joe Slater on Tue, 06 Feb 2024 00:30:13 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

What explains this discrepancy in concat()?


I have a large matrix, the cells of each may be filled by a vector. It seems that concat() works very differently when called within a function:

> k(m,c=1)=concat(m[,c])
%62 = (m,c=1)->concat(m[,c])
> s1=k(a,15);
  ***   Warning: increasing stack size to 400000000.
  ***   Warning: increasing stack size to 800000000.
time = 203 ms.
> s2=concat(a[,15]);
time = 78 ms.
> s1==s2
time = 32 ms.
%65 = 1

What's going on here?

All the best,
Joe Slater