Added a few compile options to increase performance. As said in this comment, I think it should be safe to enable to danger flag, as any problems should be reported using the debug version.
I added one line to flush stdout in the colors file.
Made all the constants static.
Any other disclosures/notices/things to add?
There is definitely a performance increase of a few milliseconds, on my system it's 2 ms using debug mode, and on hyperfine the results are even faster on release mode.
Benchmark 1: ./bin/catnap
Time (mean ± σ): 2.0 ms ± 0.1 ms [User: 1.4 ms, System: 0.5 ms]
Range (min … max): 1.7 ms … 2.5 ms 1354 runs
Is your pull request linked to an existing issue?
132
What is your pull request about?:
Any other disclosures/notices/things to add?
There is definitely a performance increase of a few milliseconds, on my system it's 2 ms using debug mode, and on
hyperfine
the results are even faster on release mode.