2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-23 03:18:55 +00:00
restic/internal
greatroar 740758a5fa Optimize filter pattern matching
By replacing "**" with "", checking for this special path component can
be reduced to a length-zero check.

name                          old time/op    new time/op    delta
FilterLines-8                   44.7ms ± 5%    44.9ms ± 5%     ~     (p=0.631 n=10+10)
FilterPatterns/Relative-8       13.6ms ± 4%    13.4ms ± 5%     ~     (p=0.165 n=10+10)
FilterPatterns/Absolute-8       10.9ms ± 5%    10.7ms ± 4%     ~     (p=0.052 n=10+10)
FilterPatterns/Wildcard-8       53.7ms ± 5%    50.4ms ± 5%   -6.00%  (p=0.000 n=10+10)
FilterPatterns/ManyNoMatch-8     128ms ± 2%      95ms ± 1%  -25.54%  (p=0.000 n=10+10)

name                          old alloc/op   new alloc/op   delta
FilterPatterns/Relative-8       3.57MB ± 0%    3.57MB ± 0%     ~     (p=1.000 n=9+8)
FilterPatterns/Absolute-8       3.57MB ± 0%    3.57MB ± 0%     ~     (p=0.903 n=9+8)
FilterPatterns/Wildcard-8       19.7MB ± 0%    19.7MB ± 0%   -0.00%  (p=0.022 n=10+9)
FilterPatterns/ManyNoMatch-8    3.57MB ± 0%    3.57MB ± 0%     ~     (all equal)

name                          old allocs/op  new allocs/op  delta
FilterPatterns/Relative-8        22.2k ± 0%     22.2k ± 0%     ~     (all equal)
FilterPatterns/Absolute-8        22.2k ± 0%     22.2k ± 0%     ~     (all equal)
FilterPatterns/Wildcard-8        88.7k ± 0%     88.7k ± 0%     ~     (all equal)
FilterPatterns/ManyNoMatch-8     22.2k ± 0%     22.2k ± 0%     ~     (all equal)
2020-10-09 15:51:14 +02:00
..
archiver Check error in archiver before calling Select 2020-10-05 11:11:04 +02:00
backend Swap deprecated GCS lib with replacement 2020-10-03 18:55:56 +02:00
cache Less repetitive error messages in internal/cache 2020-10-05 20:28:54 +02:00
checker repository: Simplify worker group code 2020-09-05 10:07:16 +02:00
crypto crypto: Remove unused error 2020-09-05 10:07:16 +02:00
debug Remove build tag release 2018-10-11 19:40:38 +02:00
dump Move internal/fs.TestChdir to internal/test.Chdir 2020-09-17 10:43:33 +02:00
errors backup: Improve error message for invalid pattern 2018-10-03 11:12:51 +02:00
filter Optimize filter pattern matching 2020-10-09 15:51:14 +02:00
fs Simplify os.ModeType|os.ModeCharDevice => os.ModeType 2020-09-21 14:21:32 +02:00
fuse Merge a few variable declaration and initializations 2020-09-05 10:05:34 +02:00
hashing Micro-optimization for hashing.Writer/PackerManager 2020-03-05 22:30:04 +01:00
index Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
limiter rclone: Respect bandwith limits 2018-05-22 20:48:17 +02:00
migrations Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
mock mock: Remove unused repository type 2019-04-13 13:38:39 +02:00
options options: Fix test for Go >= 1.15 2020-09-12 17:36:44 +02:00
pack Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
repository init: Add --copy-chunker-params option 2020-09-19 16:53:05 +02:00
restic backup: Correct keep policy text 2020-09-28 14:26:53 +02:00
restorer Upgrade cespare/xxhash to 2.1.1 2020-10-05 17:25:39 +02:00
selfupdate self-update: Don't cancel download after 30 seconds 2019-02-23 11:15:18 +01:00
test Move internal/fs.TestChdir to internal/test.Chdir 2020-09-17 10:43:33 +02:00
textfile Remove io.Writer from fs.File 2020-09-21 14:21:32 +02:00
ui Unindent else block after if block ending with a return statement 2020-09-05 10:07:16 +02:00
walker error variable names should start with 'Err' 2020-09-05 10:07:17 +02:00