Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse everything #15

Closed
wants to merge 15 commits into from
Closed

Reuse everything #15

wants to merge 15 commits into from

Conversation

mstoykov
Copy link
Contributor

No description provided.

with streaming promql protobuf marshalling which cuts down on the number
of allocations significantly.

name                             time/op
StoreFromPrecompiledTemplates-8   114ms ± 4%
StoreFromTemplates-8              199ms ± 4%

name                             alloc/op
StoreFromPrecompiledTemplates-8  59.9MB ± 0%
StoreFromTemplates-8              149MB ± 0%

name                             allocs/op
StoreFromPrecompiledTemplates-8    26.4 ± 6%
StoreFromTemplates-8               589k ± 0%
@mstoykov mstoykov marked this pull request as ready for review March 15, 2022 12:10
name                             old time/op    new time/op    delta
StoreFromPrecompiledTemplates-8     114ms ± 4%     113ms ± 9%     ~     (p=0.489 n=9+9)
StoreFromTemplates-8                199ms ± 4%     172ms ± 8%  -13.89%  (p=0.000 n=9+10)

name                             old alloc/op   new alloc/op   delta
StoreFromPrecompiledTemplates-8    59.9MB ± 0%    59.9MB ± 0%     ~     (p=1.000 n=10+10)
StoreFromTemplates-8                149MB ± 0%     145MB ± 0%   -2.21%  (p=0.000 n=8+10)

name                             old allocs/op  new allocs/op  delta
StoreFromPrecompiledTemplates-8      26.4 ± 6%      26.0 ± 0%     ~     (p=0.173 n=10+9)
StoreFromTemplates-8                 589k ± 0%      311k ± 0%  -47.21%  (p=0.000 n=8+8)
name                             old time/op    new time/op    delta
StoreFromPrecompiledTemplates-8     111ms ± 8%     111ms ±12%     ~     (p=0.912 n=10+10)
StoreFromTemplates-8                178ms ± 6%     116ms ±18%  -34.61%  (p=0.000 n=10+10)

name                             old alloc/op   new alloc/op   delta
StoreFromPrecompiledTemplates-8    59.9MB ± 0%    59.9MB ± 0%     ~     (p=0.120 n=8+9)
StoreFromTemplates-8                145MB ± 0%      60MB ± 0%  -58.80%  (p=0.000 n=10+10)

name                             old allocs/op  new allocs/op  delta
StoreFromPrecompiledTemplates-8      25.8 ± 5%      26.0 ± 0%     ~     (p=0.353 n=10+7)
StoreFromTemplates-8                 311k ± 0%        0k ± 0%  -99.95%  (p=0.000 n=10+10)

This still has 150 vs 26 allocations when the template is precompiled
@mstoykov mstoykov mentioned this pull request Mar 23, 2022
@mstoykov
Copy link
Contributor Author

closing in favor of #17 which rewrites the history and has some additional tests and cleanup

@mstoykov mstoykov closed this Mar 23, 2022
@mstoykov mstoykov deleted the reuseEverything branch March 23, 2022 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant