printf slows down my program

后端 未结 9 750
旧巷少年郎
旧巷少年郎 2020-12-14 01:55

I have a small C program to calculate hashes (for hash tables). The code looks quite clean I hope, but there\'s something unrelated to it that\'s bugging me.

I can e

9条回答
  •  天命终不由人
    2020-12-14 02:47

    You could store your strings in a buffer and output them to a file (or console) at the end or periodically, when your buffer is full.

    If outputting to a console, scrolling is usually a killer.

提交回复
热议问题