Let Go, Standard Library From Community
Stephen Waits
steve at waits.net
Fri Apr 20 10:27:14 PDT 2007
Daniel Keep wrote:
>
> To be honest, I wouldn't know the most efficient way to return or pass
> out a vector because I've never had any kind of grounding in the effects
> of the various ways of doing it. For instance: at what point does
> passing by reference become faster than by value?
10 second lesson on optimization:
* Memory access is slow. Both reading and writing. It's generally been
that way for a long time, and appears to be staying that way.
* Optimize what is slowest.
* Know what's slowest by profiling.
* The largest gains generally come from larger algorithmic changes.
--Steve
More information about the Digitalmars-d
mailing list