Michael Eischer
bcc3bddcf4
filter: only check whether a child path could match when necessary
When checking excludes there is no need to test whether a child path
could also match the pattern, as it is by definition excluded.
Previously childMayMatch was calculated but then discarded. For simple
absolute paths this can account for half the time spent for checking
pattern matches.
name old time/op new time/op delta
FilterPatterns/Relative-4 23.3ms ± 9% 21.7ms ± 6% -6.68% (p=0.004 n=10+10)
FilterPatterns/Absolute-4 13.9ms ± 7% 10.0ms ± 5% -27.61% (p=0.000 n=10+10)
FilterPatterns/Wildcard-4 51.4ms ± 7% 47.0ms ± 7% -8.51% (p=0.001 n=9+9)
FilterPatterns/ManyNoMatch-4 551ms ± 9% 190ms ± 1% -65.41% (p=0.000 n=10+8)
name old alloc/op new alloc/op delta
FilterPatterns/Relative-4 3.57MB ± 0% 3.57MB ± 0% ~ (p=0.665 n=10+9)
FilterPatterns/Absolute-4 3.57MB ± 0% 3.57MB ± 0% ~ (p=0.480 n=9+10)
FilterPatterns/Wildcard-4 14.3MB ± 0% 14.3MB ± 0% ~ (p=0.431 n=9+10)
FilterPatterns/ManyNoMatch-4 3.57MB ± 0% 3.57MB ± 0% ~ (all equal)
name old allocs/op new allocs/op delta
FilterPatterns/Relative-4 22.2k ± 0% 22.2k ± 0% ~ (all equal)
FilterPatterns/Absolute-4 22.2k ± 0% 22.2k ± 0% ~ (all equal)
FilterPatterns/Wildcard-4 88.7k ± 0% 88.7k ± 0% ~ (all equal)
FilterPatterns/ManyNoMatch-4 22.2k ± 0% 22.2k ± 0% ~ (all equal)
2020-10-07 20:47:52 +02:00
..
2020-10-06 20:20:05 +02:00
2017-07-23 14:19:13 +02:00
2020-06-14 11:08:11 +02:00
2020-09-19 19:52:09 +08:00
2020-10-06 00:08:59 +02:00
2020-08-16 11:16:38 +02:00
2020-10-06 00:08:59 +02:00
2020-09-19 16:53:05 +02:00
2020-08-16 11:16:38 +02:00
2020-09-13 16:28:46 +02:00
2020-08-30 16:00:48 +02:00
2020-08-31 22:43:10 +02:00
2020-09-05 10:07:17 +02:00
2020-10-02 16:55:56 +03:00
2020-08-28 02:16:22 +00:00
2020-10-01 00:50:26 +02:00
2020-09-19 15:47:32 +02:00
2020-08-28 02:16:22 +00:00
2020-09-13 16:19:22 +02:00
2020-08-28 02:16:22 +00:00
2020-08-03 19:45:39 +02:00
2020-02-12 23:09:26 +01:00
2020-08-25 22:47:38 +02:00
2020-08-16 11:34:01 +02:00
2020-09-30 17:44:34 +02:00
2020-10-07 20:47:52 +02:00
2020-10-03 07:02:23 +02:00
2020-10-05 15:08:09 +02:00
2020-10-05 13:14:10 +02:00
2020-08-30 17:14:48 +02:00
2020-02-27 08:35:23 +01:00
2020-02-12 23:09:26 +01:00
2020-02-12 23:09:26 +01:00
2020-09-27 14:24:04 +02:00
2017-07-23 14:19:13 +02:00
2020-09-19 19:52:09 +08:00
2020-10-07 20:47:52 +02:00
2020-08-30 17:14:56 +02:00
2017-07-23 14:19:13 +02:00
2020-08-04 08:38:57 +02:00
2018-04-30 14:19:04 +02:00
2018-04-30 14:19:04 +02:00
2020-10-01 00:50:27 +02:00
2020-10-06 22:49:48 +02:00
2018-06-16 15:55:04 +09:00
2020-09-05 10:06:23 +02:00
2020-08-29 10:48:44 +02:00
2020-08-29 10:48:44 +02:00
2020-10-06 23:16:41 +02:00
2020-02-26 22:17:59 +01:00
2020-06-14 11:08:11 +02:00
2020-10-05 19:54:07 +02:00
2020-08-25 22:47:38 +02:00
2020-10-02 21:10:52 +02:00