Prefer pre-inc/dec unless post-inc/dec are necessary

This commit is contained in:
Rangi42
2025-07-19 15:04:08 -04:00
parent bf69043a1d
commit 14f5e16ae8
19 changed files with 111 additions and 118 deletions

View File

@@ -71,7 +71,7 @@ static inline int ctz(unsigned int x) {
while (!(x & 1)) {
x >>= 1;
cnt++;
++cnt;
}
return cnt;
}
@@ -81,7 +81,7 @@ static inline int clz(unsigned int x) {
while (x <= UINT_MAX / 2) {
x <<= 1;
cnt++;
++cnt;
}
return cnt;
}