From: Luis R. Rodriguez on
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.

Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: David Newall on
I don't know about unsigned int; but looping down to zero should be
faster on many architectures, as they automatically test for zero (or
negative) on decrement. Counting up requires an additional test.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/