Passing array as const slows down code?

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Wed May 2 13:05:13 PDT 2012


On 30/04/12 16:03, Steven Schveighoffer wrote:
> Try removing the ref and see if it goes back. That usage of ref should not
> affect anything (if anything it should be slower, since it's an extra level of
> indirection).

Removing the ref ups the time as described before, but only with GDC (DMD the 
runtime is the same).  It's a real effect.

> There is no implicit local copy for const. I have a suspicion that you changed
> two things and forgot about one of them when running your tests.

Really don't think so.  You can even check the version history of changes if you 
like!


More information about the Digitalmars-d-learn mailing list