Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Now the snippet for `opt-level=3`:
```

As you can see, the code is rearranged from one version to the other. This version is shorter and there is only one conditional jump
to exit the loop. The 4 conditional jumps are replaced by 4 conditional moves. That's pretty cool te be honest.
to exit the loop. The 4 conditional jumps are replaced by 4 conditional moves. That's pretty cool to be honest.

But oh the irony: when the compiler successfully emit a compare function that actually produce conditional moves instead of conditional
jumps, the performance plummet.
Expand All @@ -259,7 +259,7 @@ jumps, the performance plummet.
Modern CPUs are [very complex](https://en.wikichip.org/w/images/c/c7/haswell_block_diagram.svg) beasts and they try their best to run
our code as fast as possible. They may [reorder](https://en.wikipedia.org/wiki/Out-of-order_execution) operations, introduce
[instruct level parallelism](https://en.wikipedia.org/wiki/Instruction-level_parallelism) do [branch prediction](https://en.wikipedia.org/wiki/Branch_predictor)
and [speculative exeuction](https://en.wikipedia.org/wiki/Speculative_execution) to squeeze out the maximum work from each CPU cycle.
and [speculative execution](https://en.wikipedia.org/wiki/Speculative_execution) to squeeze out the maximum work from each CPU cycle.

Each instruction has a latency (number of cycles to perform the instruction) and can be executed by only a selected set of
[execution units](https://en.wikipedia.org/wiki/Execution_unit) routed by dedicated ports, which will eventually dictate their
Expand Down