Function to print a diamond shape

monarch_dodra monarchdodra at gmail.com
Tue Mar 25 08:31:10 PDT 2014


On Tuesday, 25 March 2014 at 12:30:37 UTC, Jay Norwood wrote:
> These are times on ubuntu. printDiamond3 was slower than 
> printDiamond.

Hum... Too bad :/

I was able to improve my first "printDiamon" by having a single 
slice that contains spaces then stars, and make writeln's of that.

It gave (on my windows) speeds comparable to your printDiamond3. 
But not any speed differences that warrants posting new code.

Thanks for the benches. This was fun :)

I love how D can achieve *great* performance, while still looking 
readable and maintainable.


More information about the Digitalmars-d-learn mailing list