[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Krazy: prefix vs. postfix ++ and -- operators
From: Christoph Feck <christoph () maxiom ! de>
Date: 2011-01-11 15:16:23
Message-ID: 201101111616.24146.christoph () maxiom ! de
[Download RAW message or body]
Krazy says:
"You should use ++ and -- as prefix whenever possible as these are more
efficient than postfix operators. Prefix increments first and then uses the
variable, postfix uses the actual; the variable is incremented as well.
Because of this, the prefix operators are inherently more efficient."
Considering that today's CPUs have multiple pipelines, using a value directly
seems faster to me than waiting for it to be incremented or decremented.
Is this krazy warning still correct?
Christoph Feck (kdepepo)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic