-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
colbuilder: reuse the unlimited monitors for the same operators
This commit reduces the number of monitors that we create for different operators. Previously, for each unlimited memory account we would instantiate a separate memory monitor, but that doesn't give us much benefit and incurs extra allocations, so this commit reuses the same unlimited monitor for as many accounts as needed for a component. Additionally this commit reduces the allocations when constructing a unique memory monitor name which were introduced when we marked the monitor name as `redact.RedactableString`. ``` name old time/op new time/op delta FlowSetup/vectorize=true/distribute=true-24 162µs ± 4% 160µs ± 6% ~ (p=0.087 n=18+20) FlowSetup/vectorize=true/distribute=false-24 162µs ± 4% 161µs ± 5% ~ (p=0.181 n=19+19) FlowSetup/vectorize=false/distribute=true-24 159µs ± 4% 160µs ± 7% ~ (p=0.862 n=20+20) FlowSetup/vectorize=false/distribute=false-24 160µs ±11% 155µs ± 6% -3.40% (p=0.009 n=20+20) name old alloc/op new alloc/op delta FlowSetup/vectorize=true/distribute=true-24 18.9kB ± 5% 18.8kB ± 6% ~ (p=0.097 n=18+20) FlowSetup/vectorize=true/distribute=false-24 17.7kB ± 1% 17.5kB ± 7% -0.82% (p=0.001 n=17+18) FlowSetup/vectorize=false/distribute=true-24 25.4kB ± 0% 25.4kB ± 0% ~ (p=0.824 n=16+17) FlowSetup/vectorize=false/distribute=false-24 24.4kB ± 0% 24.4kB ± 1% ~ (p=0.558 n=16+16) name old allocs/op new allocs/op delta FlowSetup/vectorize=true/distribute=true-24 203 ± 1% 196 ± 2% -3.39% (p=0.000 n=19+19) FlowSetup/vectorize=true/distribute=false-24 194 ± 1% 187 ± 3% -3.59% (p=0.000 n=19+19) FlowSetup/vectorize=false/distribute=true-24 197 ± 0% 197 ± 0% ~ (all equal) FlowSetup/vectorize=false/distribute=false-24 187 ± 0% 187 ± 0% ~ (p=0.515 n=16+17) ``` Release justification: low-risk improvement. Release note: None
- Loading branch information
1 parent
74092ab
commit 649113d
Showing
3 changed files
with
106 additions
and
117 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
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