1

I'm trying to optimise my code by making us of packed array. However, it appears that using Set in combination with Part sometime unpacks the array, and sometimes leaves the array packed, even when the data you put in is of the same type.

When does Set unpack an array?

Here is an example:

Example

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
user44136
  • 41
  • 2

1 Answers1

4

See my answer here. The right hand side of the assignment has to be a packed array.

Jacob Akkerboom
  • 12,215
  • 45
  • 79