Steven Hughes
2007-10-25 14:10:51 UTC
Darrel, ( I think we should start using SourceForge lists for this
discussion so that's why you're receiving this through SF)
We've talked about using pass-by-value (PBV) vs. pass-by-ref (PBR) in
functions calls. PBV requires making a copy of the object which is a
performance hit. PBR is faster, but will result in changes to the
inputs even if that is not what the user wants. How about a middle
ground, if an object is contained in both the input arg list, and the
output arg list, it uses PBR, and if it does not appear in the output
list it uses PBV? Do you think this would add a lot of complexity to
the design? It could allow a significant performance improvement in
some cases.
Steve
Here's the syntax we're assuming for GMAT function calls (Identical to
MATLAB's syntax).
[Out1, Out2, Out3, ...., OutN] = FuncName(In1, In2, In3, ....., InM)
discussion so that's why you're receiving this through SF)
We've talked about using pass-by-value (PBV) vs. pass-by-ref (PBR) in
functions calls. PBV requires making a copy of the object which is a
performance hit. PBR is faster, but will result in changes to the
inputs even if that is not what the user wants. How about a middle
ground, if an object is contained in both the input arg list, and the
output arg list, it uses PBR, and if it does not appear in the output
list it uses PBV? Do you think this would add a lot of complexity to
the design? It could allow a significant performance improvement in
some cases.
Steve
Here's the syntax we're assuming for GMAT function calls (Identical to
MATLAB's syntax).
[Out1, Out2, Out3, ...., OutN] = FuncName(In1, In2, In3, ....., InM)