-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
1 parent
b90d1f0
commit 9ceb2ff
Showing
2 changed files
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters