D:\diamond\diamond\diamond\Release>diamond 1>nul brad: time: 19554[ms] printDiamond1: time: 1154[ms] printDiamond2: time: 1637[ms] printDiamond3: time: 622[ms] jay1: time: 475[ms] sergei: time: 11939[ms] jay2: time: 413[ms]
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.
- Re: Function to print a diamond shape Ali Çehreli
- Re: Function to print a diamond shape Sergei Nosov
- Re: Function to print a diamond shape Andrea Fontana
- Re: Function to print a diamond shape Vladimir Panteleev
- Re: Function to print a diamond shape Sergei Nosov
- Re: Function to print a diamond shape Jay Norwood
- Re: Function to print a diamond shape Jay Norwood
- Re: Function to print a diamond s... Ali Çehreli
- Re: Function to print a diamo... Jay Norwood
- Re: Function to print a diamo... Jay Norwood
- Re: Function to print a diamo... Jay Norwood
- Re: Function to print a diamo... bearophile
- Re: Function to print a diamo... Jay Norwood
- Re: Function to print a diamo... Jay Norwood
- Re: Function to print a diamo... monarch_dodra
- Re: Function to print a diamo... Jay Norwood
- Re: Function to print a diamond shape Luís.Marques
- Re: Function to print a diamond shape bearophile
- Re: Function to print a diamond shape Jay Norwood
- Re: Function to print a diamond shape Jay Norwood
- Re: Function to print a diamond shape monarch_dodra