- Code: Select all
A(1:n) or A(1:end)
The latter.
Whenever possible, use "1:end" when sub-referencing.
"1:n" will get expanded out in memory by MATLAB, then Jacket must process that sequence to determine that it could be "compressed" to some linear sequence.
If you use "1:end", "1:end-1", or something like that involving the "end" keywords, then Jacket already gets notified that this is a linear sequence -- no need to scan through all the elements.
Just a tip that might help you out!
-John (posting on behalf of "malcolm" who is working hard on Jacket 1.3 right now
