mirror of
https://github.com/Karaka-Management/Developer-Guide.git
synced 2026-01-14 21:48:41 +00:00
Update cpp.md
Signed-off-by: Dennis Eichhorn <spl1nes.com@googlemail.com>
This commit is contained in:
parent
20a754151b
commit
0910172c26
|
|
@ -42,9 +42,9 @@ Branched code
|
|||
|
||||
```c++
|
||||
for (int i = 0; i < N; i++)
|
||||
if (a[i] < 50) {
|
||||
s += a[i];
|
||||
}
|
||||
if (a[i] < 50) {
|
||||
s += a[i];
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ Branchless code
|
|||
|
||||
```c++
|
||||
for (int i = 0; i < N; i++)
|
||||
s += (a[i] < 50) * a[i];
|
||||
s += (a[i] < 50) * a[i];
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user