fizzbuzz icon indicating copy to clipboard operation
fizzbuzz copied to clipboard

reduce print count per iteration

Open kariya-mitsuru opened this issue 4 years ago • 0 comments

recudeprint.c By changing the output count per iteration from 15 to 30, reduce the number of myitoa calls from 8/15 to 3/30. (The last digit is always the same for every iteration, so there is no need to output it by myitoa.)

reduceandreuse.c Combine reduceprint.c & reusebuffer2.c

My machine's results.

reusebuffer2    5.119s
reduceprint     4.740s
reduceandreuse  4.167s

kariya-mitsuru avatar Feb 14 '21 16:02 kariya-mitsuru