mirror of
https://github.com/Karaka-Management/Developer-Guide.git
synced 2026-02-07 00:08: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++
|
```c++
|
||||||
for (int i = 0; i < N; i++)
|
for (int i = 0; i < N; i++)
|
||||||
if (a[i] < 50) {
|
if (a[i] < 50) {
|
||||||
s += a[i];
|
s += a[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ Branchless code
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
for (int i = 0; i < N; i++)
|
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