Does GCC perform profile-guided switch case reordering and balancing?

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

 



I'm working on a program where a few switch statements end up being
hotspots. Some manual experimentation shows that rearranging switch
cases so that more commonly executed ones appear together helps, as
does checking for the most common case separately. The downside is
that it makes the code uglier. Can GCC perform these kinds of
optimizations as part of PGO, and how good is it at it?

/Ulf




[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