I haven't used PackedArray before, but just started looking at using them here to read their discussion here.
I have many large one-dimensional and two-dimensional large-sized matrices from all reals, and there are no symbolic ones (this is a PDE solver with finite difference), and therefore I thought that I should use the use of PackedArray.
I have an initialization function where I select all the necessary data / grids. So I went and used ToPackedArraythem. This seems a little faster, but I need to do more performance tests to better compare the speed before and after, and also compare the use of RAM.
But while I was looking at this, I noticed that some operations in M โโautomatically return lists in PackedArray already, and some not.
For example, this does not return a packed array
a = Table[RandomReal[], {5}, {5}];
Developer`PackedArrayQ[a]
But it does
a = RandomReal[1, {5, 5}];
Developer`PackedArrayQ[a]
and this one does
a = Table[0, {5}, {5}];
b = ListConvolve[ {{0, 1, 0}, {1, 4, 1}, {0, 1, 1}}, a, 1];
Developer`PackedArrayQ[b]
as well as matrix multiplication makes the return result in a packed array
a = Table[0, {5}, {5}];
b = a.a;
Developer`PackedArrayQ[b]
But elemental multiplication is not
b = a*a;
Developer`PackedArrayQ[b]
My question is: is there a list somewhere, which documents that M-commands return PackedArray, is it not? (provided that the data complies with requirements such as Real, not mixed, not symbolic, etc.)
, - , , , / , ToPackedArray? , ToPackedArray , .
,
update (1)
, , PackedArray CDF, . . , . .