-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(storage): memoize hashmap prom labels
Prior to this, each hashmap operation that was instrumented involved initialising a map. Now these maps are pre-initialised. ``` ⇒ benchstat old.txt new.txt name old time/op new time/op delta Index_CreateSeriesListIfNotExist/create_series-8 5.00s ± 3% 5.13s ± 2% +2.50% (p=0.033 n=10+7) Index_CreateSeriesListIfNotExist/already_exist_series-8 557ms ± 3% 530ms ± 6% -4.85% (p=0.001 n=10+8) name old alloc/op new alloc/op delta Index_CreateSeriesListIfNotExist/create_series-8 2.57GB ± 0% 1.84GB ± 1% -28.52% (p=0.000 n=8+10) Index_CreateSeriesListIfNotExist/already_exist_series-8 678MB ± 0% 308MB ± 0% -54.55% (p=0.000 n=10+8) name old allocs/op new allocs/op delta Index_CreateSeriesListIfNotExist/create_series-8 28.9M ± 0% 24.5M ± 0% -15.22% (p=0.000 n=9+10) Index_CreateSeriesListIfNotExist/already_exist_series-8 2.23M ± 0% 0.03M ± 0% -98.51% (p=0.000 n=10+10) ```
- Loading branch information
Showing
1 changed file
with
40 additions
and
24 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