Re: Timing loops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gaz,

Yes, timing loops (busy loops) may be optimized out by GCC.  (I'm laughing just thinking about -funroll-all-loops a busy loop.)

Timing loops that use sleep(), usleep(), nanosleep() or wait() or some event-based execution suspension won't (can't) be optimized out by GCC.  Timing (busy) loops that poll a volatile, high-precision volatile timer won't (can't) be optimized out by GCC.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux