db: Optimize authzFilter code path
Created by: tsenart
Summary
This PR optimizes the authzFilter
code paths.
Benchmark
name old time/op new time/op delta
_authzFilter-16 56.2ms ± 2% 1.0ms ± 1% -98.14% (p=0.000 n=15+15)
name old alloc/op new alloc/op delta
_authzFilter-16 55.3MB ± 0% 0.5MB ± 0% -99.03% (p=0.000 n=15+14)
name old allocs/op new allocs/op delta
_authzFilter-16 65.8k ± 0% 0.0k ± 0% -99.94% (p=0.000 n=15+15)