Commit d36547f
Eliminate intermediate vector in traverse_path function
Summary:
### Summary
This diff optimizes the `traverse_path` function in `traversal.rs` by eliminating the unnecessary intermediate vector `entries`. Instead of collecting the entries into a vector and then iterating over it, the code now directly iterates over the `entries` iterator, reducing memory allocation and deallocation.
Reviewed By: akushner
Differential Revision: D83885563
fbshipit-source-id: ec7da884bd081bde4f2f93ac8cb9cf27cfaad8d51 parent fc3993d commit d36547f
1 file changed
+6
-8
lines changedLines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
182 | 183 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 184 | + | |
| 185 | + | |
191 | 186 | | |
192 | 187 | | |
| 188 | + | |
193 | 189 | | |
194 | 190 | | |
195 | 191 | | |
| |||
207 | 203 | | |
208 | 204 | | |
209 | 205 | | |
| 206 | + | |
210 | 207 | | |
211 | 208 | | |
212 | 209 | | |
213 | 210 | | |
| 211 | + | |
214 | 212 | | |
215 | 213 | | |
216 | 214 | | |
| |||
0 commit comments