SO rotate question
bearophile
bearophileHUGS at lycos.com
Fri Sep 3 04:32:49 PDT 2010
simendsjo:
> I agree that's much simpler, but s1 ~ s1 doesn't perform too well I
> think. Always creates a new heap allocation and copies the array..
The version written by Pelle is better. On the other hand performance is not an absolute thing, it's "good enough" or "not good enough", and in many situations you don't need a high-performance rotate test function.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list