Commit 1fea4b5
committed
perf(pkg): memoize Lock_dir.get_with_path
Before:
```
[ocaml-cohttp]$ hyperfine "dune build"
Benchmark 1: dune build
Time (mean ± σ): 4.842 s ± 0.060 s [User: 4.444 s, System: 0.365 s]
Range (min … max): 4.725 s … 4.908 s 10 runs
```
After:
```
[ocaml-cohttp]$ hyperfine "dune build"
Benchmark 1: dune build
Time (mean ± σ): 3.488 s ± 0.044 s [User: 3.186 s, System: 0.283 s]
Range (min … max): 3.399 s … 3.550 s 10 runs
```
Signed-off-by: Ali Caglayan <[email protected]>1 parent a268d9e commit 1fea4b5
1 file changed
+35
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
209 | 209 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
223 | 236 | | |
224 | 237 | | |
225 | 238 | | |
| |||
0 commit comments