Joseph Rushton Wakeling:

... because I found I got about a 2s speedup. It's exactly the speedup which was removed by adding "const" to the function input, so I presume it's as you say, that this was implicitly creating a local copy.

I suggest to take a look at the asm in both cases, and compare. Adding "const" doesn't cause local copies.

Bye,
bearophile

Reply via email to