I have a C application that is heavily network I/O bound. It is currently compiled with -O2
on gcc. Building the application with -Os
shows gives a 20% size reduction. Some basic testing showed no measurable decrease (or increase) in performance.
Is this a good case for building with -Os
? Is there a reason not to do this? I've never actually seen a program that has been compiled for size no matter how much time it spends on I/O.