Using unsigned int for loop counters - better performance for Architectures - urban hacker legend?

From: Luis R. Rodriguez
Date: Fri Jul 30 2010 - 19:53:58 EST

For good while now I have been using unsigned int for every looper
iterator I implement on the kernel. I remember I picked this practice
up from Jiri but I just tried to look for actual documentation of this
online and could not find much. A simple test would be to run a series
of loop tests on different architectures with a regular int and then
with an unsigned int to see if performance improves but I obviously
don't have access to many machines with varying architectures.

So if you also follow this practice have you actually found evidence
for this practice, have you actually measured performance metrics? Or
is this just a urban hacker legend?

Please CC me as i am not subscribed to lkml.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at