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.

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]



Reply via email to