2
2
mirror of https://github.com/octoleo/restic.git synced 2025-01-24 07:38:25 +00:00
greatroar 190d8e2f51 Flatten backend.LimitedReadCloser structure
This inlines the io.LimitedReader into the LimitedReadCloser body to
achieve fewer allocations. Results on linux/amd64:

name                                      old time/op    new time/op    delta
Backend/BenchmarkLoadPartialFile-8           412µs ± 4%     413µs ± 4%    ~     (p=0.634 n=17+17)
Backend/BenchmarkLoadPartialFileOffset-8     455µs ±13%     441µs ±10%    ~     (p=0.072 n=20+18)

name                                      old speed      new speed      delta
Backend/BenchmarkLoadPartialFile-8        10.2GB/s ± 3%  10.2GB/s ± 4%    ~     (p=0.817 n=16+17)
Backend/BenchmarkLoadPartialFileOffset-8  9.25GB/s ±12%  9.54GB/s ± 9%    ~     (p=0.072 n=20+18)

name                                      old alloc/op   new alloc/op   delta
Backend/BenchmarkLoadPartialFile-8            888B ± 0%      872B ± 0%  -1.80%  (p=0.000 n=15+15)
Backend/BenchmarkLoadPartialFileOffset-8      888B ± 0%      872B ± 0%  -1.80%  (p=0.000 n=15+15)

name                                      old allocs/op  new allocs/op  delta
Backend/BenchmarkLoadPartialFile-8            18.0 ± 0%      17.0 ± 0%  -5.56%  (p=0.000 n=15+15)
Backend/BenchmarkLoadPartialFileOffset-8      18.0 ± 0%      17.0 ± 0%  -5.56%  (p=0.000 n=15+15)
2020-06-17 13:11:45 +02:00
..
2018-10-05 11:39:02 -07:00
2019-07-01 00:24:45 +03:00
2018-04-01 10:16:31 +02:00
2018-03-03 15:49:44 +01:00
2019-07-01 00:24:45 +03:00
2017-07-23 14:19:13 +02:00
2018-03-03 15:49:44 +01:00
2018-03-03 15:49:44 +01:00
2017-07-23 14:19:13 +02:00
2018-04-01 10:16:31 +02:00
2017-07-23 14:19:13 +02:00
2018-04-01 10:16:31 +02:00
2018-04-01 10:16:31 +02:00