Optimization: convert functions that return an array to subroutines
Example:
A = f(B)
Gets converted to:
call f(B, A)
Where A
and B
are arrays. If this is part of an expression, then a temporary array must be created (which would be the case with a function also internally).
This way there will be no temporary and extra copy in most cases.