8000 feat: StrStore stores string with lower GC overhead by ppzqh · Pull Request #25 · cloudwego/gopkg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: StrStore stores string with lower GC overhead #25

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

Merged
merged 2 commits into from
Sep 16, 2024
Merged

Conversation

ppzqh
Copy link
Contributor
@ppzqh ppzqh commented Sep 13, 2024

What type of PR is this?

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.

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

en:
zh(optional):
Store strings with constant objects num to reduce GC overhead

Benchmark

  • GC
    BenchmarkStrStoreGC-12 9181 120120 ns/op
    BenchmarkStdStrSliceGC-12 205 5524023 ns/op

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

(optional) The PR that updates user documentation:

Copy link
@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license-eye has totally checked 38 files.

Valid Invalid Ignored Fixed
36 2 0 0
Click to see the invalid file list
  • container/strstore/strstore.go
  • container/strstore/strstore_test.go

@ppzqh ppzqh force-pushed the feat-strstore branch 2 times, most recently from ee203fd to 735b2c5 Compare September 13, 2024 07:27
@ppzqh ppzqh changed the title feat: StrStore for storing strings with few objects feat: StrStore stores string with lower GC overhead Sep 16, 2024
@ppzqh ppzqh force-pushed the feat-strstore branch 2 times, most recently from 6b817bd to ba67c35 Compare September 16, 2024 09:29
@ppzqh ppzqh merged commit d404439 into main Sep 16, 2024
16 checks passed
@xiaost xiaost deleted the feat-strstore branch September 27, 2024 06:00
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.

2 participants
0