Head Const
ZombineDev via Digitalmars-d
digitalmars-d at puremagic.com
Tue Feb 16 01:45:34 PST 2016
On Tuesday, 16 February 2016 at 08:03:31 UTC, Jonathan M Davis
wrote:
> ...
> Given that very few optimizations can be made based solely on
> const (and I'm not sure that the compiler currently does any of
> them) ...
I think that the fact that we have shared can help a lot in the
area of optimization.
Taking a non-shared const parameter should be as good as taking
an immutable one (if the function pure-like - only does
computation based on the parameter and doesn't escape it).
Or am I missing something?
More information about the Digitalmars-d
mailing list