rpm-rs / rpm

Other
46 stars 24 forks source link

Remove extra allocation in get_file_paths #237

Closed marxin closed 2 months ago

marxin commented 2 months ago

I was able to measure a difference for debuginfod-rs:

  Time (mean ± σ):      2.303 s ±  0.017 s    [User: 25.220 s, System: 5.214 s]
  Range (min … max):    2.272 s …  2.327 s    10 runs

  Warning: Ignoring non-zero exit code.

Benchmark 2: /tmp/after3
  Time (mean ± σ):      2.298 s ±  0.028 s    [User: 24.979 s, System: 5.310 s]
  Range (min … max):    2.241 s …  2.331 s    10 runs

  Warning: Ignoring non-zero exit code.

Summary
  /tmp/after3
    1.00 ± 0.01 times faster than /tmp/before