![]() |
Blitz Devel : |
From: Theodore Papadopoulo (Theodore.Papadopoulo_at_[hidden])
Date: 2004-07-29 06:54:51
cummings_at_[hidden] said:
> I have no problems with this patch. I remember the discussion a while
> back about whether it was more or less efficient to use const
> reference rather than value type. A reference is clearly preferred
> for larger objects such as the complex<T> type. For simple built-in
> types, I would guess that most compilers will optimize the cost of
> dereferencing the reference as needed. In other words, they will
> dereference the reference once and store the value as a temporary in
> a register if they see that the code is using the value repeatedly.
> The runtime penalty will be tiny.
Thank's, committed.
All of this is of course true all the more that those function could
be inlined in which case even the pointer address and derenferencing
might be optimized away.
Theo.
--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo_at_[hidden] Tel: (33) 04 92 38 76 01
--------------------------------------------------------------------