Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance of metric expression matcher (#5864)
Refactored env struct to avoid creating closure functions for every expression evaluation operation. This reduced the allocations and increased the speed. Improvements: $ benchstat old.txt new.txt name old time/op new time/op delta ExprFilter-8 537µs ± 2% 476µs ± 1% -11.33% (p=0.000 n=9+10) name old alloc/op new alloc/op delta ExprFilter-8 151kB ± 0% 102kB ± 0% -32.43% (p=0.000 n=8+8) name old allocs/op new allocs/op delta ExprFilter-8 8.44k ± 0% 6.39k ± 0% -24.24% (p=0.000 n=10+10)
- Loading branch information