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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Newall
Date: Saturday, July 31, 2010 - 2:38 am

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.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Using unsigned int for loop counters - better performance ..., Luis R. Rodriguez, (Fri Jul 30, 4:53 pm)
Re: Using unsigned int for loop counters - better performa ..., David Newall, (Sat Jul 31, 2:38 am)