Skip to content

Commit 7f4eaa8

Browse files
committed
Fix inclusive range performance regression introduced by 1.90
1 parent 77b7639 commit 7f4eaa8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Performance is reasonable even on older hardware, for example a 2011 MacBook Pro
123123
| 14 | [Parabolic Reflector Dish](https://adventofcode.com/2023/day/14) | [Source](src/year2023/day14.rs) | 632 |
124124
| 15 | [Lens Library](https://adventofcode.com/2023/day/15) | [Source](src/year2023/day15.rs) | 84 |
125125
| 16 | [The Floor Will Be Lava](https://adventofcode.com/2023/day/16) | [Source](src/year2023/day16.rs) | 160 |
126-
| 17 | [Clumsy Crucible](https://adventofcode.com/2023/day/17) | [Source](src/year2023/day17.rs) | 2289 |
126+
| 17 | [Clumsy Crucible](https://adventofcode.com/2023/day/17) | [Source](src/year2023/day17.rs) | 2379 |
127127
| 18 | [Lavaduct Lagoon](https://adventofcode.com/2023/day/18) | [Source](src/year2023/day18.rs) | 17 |
128128
| 19 | [Aplenty](https://adventofcode.com/2023/day/19) | [Source](src/year2023/day19.rs) | 100 |
129129
| 20 | [Pulse Propagation](https://adventofcode.com/2023/day/20) | [Source](src/year2023/day20.rs) | 6 |

src/year2023/day17.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ fn astar<const L: i32, const U: i32>(grid: &Grid<i32>) -> i32 {
102102
let mut next = index;
103103
let mut extra = steps;
104104

105-
for i in 1..=U {
105+
for i in 1..U + 1 {
106106
if x + i >= size {
107107
break;
108108
}
@@ -120,7 +120,7 @@ fn astar<const L: i32, const U: i32>(grid: &Grid<i32>) -> i32 {
120120
let mut next = index;
121121
let mut extra = steps;
122122

123-
for i in 1..=U {
123+
for i in 1..U + 1 {
124124
if i > x {
125125
break;
126126
}
@@ -140,7 +140,7 @@ fn astar<const L: i32, const U: i32>(grid: &Grid<i32>) -> i32 {
140140
let mut next = index;
141141
let mut extra = steps;
142142

143-
for i in 1..=U {
143+
for i in 1..U + 1 {
144144
if y + i >= size {
145145
break;
146146
}
@@ -158,7 +158,7 @@ fn astar<const L: i32, const U: i32>(grid: &Grid<i32>) -> i32 {
158158
let mut next = index;
159159
let mut extra = steps;
160160

161-
for i in 1..=U {
161+
for i in 1..U + 1 {
162162
if i > y {
163163
break;
164164
}

0 commit comments

Comments
 (0)