forked from TrueCloudLab/restic
190d8e2f51
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) |
||
---|---|---|
.. | ||
azure | ||
b2 | ||
gs | ||
local | ||
location | ||
mem | ||
rclone | ||
rest | ||
s3 | ||
sftp | ||
swift | ||
test | ||
testdata | ||
backend_error.go | ||
backend_retry.go | ||
backend_retry_test.go | ||
doc.go | ||
foreground_solaris.go | ||
foreground_unix.go | ||
foreground_windows.go | ||
http_transport.go | ||
layout.go | ||
layout_default.go | ||
layout_rest.go | ||
layout_s3legacy.go | ||
layout_test.go | ||
paths.go | ||
semaphore.go | ||
shell_split.go | ||
shell_split_test.go | ||
utils.go | ||
utils_test.go |