Function to print a diamond shape
bearophile
bearophileHUGS at lycos.com
Sun Mar 23 10:30:19 PDT 2014
Jay Norwood:
> A problem with the previous brad measurement is that his
> solution creates a diamond of size 2n+1 for an input of n.
> Correcting the size input for brad's function call, and
> re-running, I get this. So the various solutions can have
> overhead computation time of 40x difference, depending on the
> implementation.
The task didn't ask for a computationally efficient solution :-)
So you are measuring something that was not optimized for. So
there's lot of variance.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list