Last time I checked the if version got compiled using cmov, which was a lot faster than module (with idiv).
| 162 | |
| 163 | // Last time I checked the if version got compiled using cmov, which was a lot faster than module (with idiv). |
| 164 | inline int prev(int i, int n) { return i-1 >= 0 ? i-1 : n-1; } |
| 165 | inline int next(int i, int n) { return i+1 < n ? i+1 : 0; } |
| 166 | |
| 167 | inline int area2(const int* a, const int* b, const int* c) |
no outgoing calls