Skip to content

Conversation

xiaost
Copy link
Collaborator

@xiaost xiaost commented Oct 8, 2024

s.serviceCBConfig.LoadOrStore(serviceCBKey, defaultCBConfig)

serviceCBKey escapes due to any parameter
defaultCBConfig escapes due to passing struct to any parameter

goos: darwin
goarch: arm64
pkg: github.com/cloudwego/kitex/pkg/circuitbreak
             │  ./old.txt  │             ./new.txt              │
             │   sec/op    │   sec/op     vs base               │
CBSuiteMW-12   95.53n ± 4%   70.98n ± 7%  -25.69% (p=0.002 n=6)

             │ ./old.txt  │             ./new.txt             │
             │    B/op    │   B/op     vs base                │
CBSuiteMW-12   40.00 ± 0%   0.00 ± 0%  -100.00% (p=0.002 n=6)

             │ ./old.txt  │             ./new.txt              │
             │ allocs/op  │ allocs/op   vs base                │
CBSuiteMW-12   2.000 ± 0%   0.000 ± 0%  -100.00% (p=0.002 n=6)

What type of PR is this?

perf

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

perf(circuitbreak): 无对象分配

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@xiaost xiaost requested review from a team as code owners October 8, 2024 10:30
@xiaost xiaost force-pushed the perf/circuitbreak branch 4 times, most recently from 24ddd44 to 9eb6d0e Compare October 14, 2024 04:37
```
s.serviceCBConfig.LoadOrStore(serviceCBKey, defaultCBConfig)
```

`serviceCBKey` escapes due to any parameter
`defaultCBConfig` escapes due to passing struct to any parameter

goos: darwin
goarch: arm64
pkg: github.com/cloudwego/kitex/pkg/circuitbreak
             │  ./old.txt  │             ./new.txt              │
             │   sec/op    │   sec/op     vs base               │
CBSuiteMW-12   95.53n ± 4%   70.98n ± 7%  -25.69% (p=0.002 n=6)

             │ ./old.txt  │             ./new.txt             │
             │    B/op    │   B/op     vs base                │
CBSuiteMW-12   40.00 ± 0%   0.00 ± 0%  -100.00% (p=0.002 n=6)

             │ ./old.txt  │             ./new.txt              │
             │ allocs/op  │ allocs/op   vs base                │
CBSuiteMW-12   2.000 ± 0%   0.000 ± 0%  -100.00% (p=0.002 n=6)
@xiaost xiaost force-pushed the perf/circuitbreak branch from 9eb6d0e to 5ae36e8 Compare October 17, 2024 13:21
@xiaost xiaost merged commit 99816dc into cloudwego:develop Oct 23, 2024
19 checks passed
@xiaost xiaost deleted the perf/circuitbreak branch October 23, 2024 04:58
ppzqh pushed a commit to ppzqh/kitex that referenced this pull request Nov 25, 2024
s.serviceCBConfig.LoadOrStore(serviceCBKey, defaultCBConfig)

serviceCBKey escapes due to any parameter
defaultCBConfig escapes due to passing struct to any parameter

goos: darwin
goarch: arm64
pkg: github.com/cloudwego/kitex/pkg/circuitbreak
             │  ./old.txt  │             ./new.txt              │
             │   sec/op    │   sec/op     vs base               │
CBSuiteMW-12   95.53n ± 4%   70.98n ± 7%  -25.69% (p=0.002 n=6)

             │ ./old.txt  │             ./new.txt             │
             │    B/op    │   B/op     vs base                │
CBSuiteMW-12   40.00 ± 0%   0.00 ± 0%  -100.00% (p=0.002 n=6)

             │ ./old.txt  │             ./new.txt              │
             │ allocs/op  │ allocs/op   vs base                │
CBSuiteMW-12   2.000 ± 0%   0.000 ± 0%  -100.00% (p=0.002 n=6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants