This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Guard use of modulo in cshift (speedup protein)


Hi Michael,

could you replace

+ if (shift< 0 || shift>= len)

by


> + if (unlikely(shift< 0 || shift>= len))

? This could save a few more cycles.

Thomas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]