@@ -63,7 +63,7 @@ data. The speedup from 435 milliseconds stated in the previous post is
63
63
due to Moore's law: I've upgraded the CPU :)
64
64
65
65
We can bring run time down by tweaking how we calculate the minimum of
66
- three elements.
66
+ three elements:
67
67
68
68
```rust
69
69
fn min2(x: f64, y: f64) -> f64 {
@@ -84,7 +84,7 @@ minimum of two elements in the previous row can be calculated without
84
84
waiting for the preceding element in the current row to be computed.
85
85
86
86
The assembly for the main loop looks like this (AT&T syntax,
87
- destination register on the right)
87
+ destination register on the right):
88
88
89
89
```
90
90
18.32 vmovsd -0x8(%rax,%rsi,8),%xmm1
@@ -149,10 +149,10 @@ For our grand plan, we need to fit a rhombus peg in a square hole:
149
149
. . . . V
150
150
```
151
151
152
- * `id` is the index of the diagonal. There are twice as much diagonals
152
+ * `id` is the index of the diagonal. There are twice as many diagonals
153
153
as rows.
154
154
* The outer loop is over `id`.
155
- * On each iteration we remember three columns (`d1`, `d2` `d3` in the
155
+ * On each iteration we remember three columns (`d1`, `d2`, `d3` in the
156
156
code).
157
157
* There is a phase transition once we've crossed the main diagonal.
158
158
* We can derive `iy` from the fact that `ix + iy = id`.
0 commit comments