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

feat:no need to store nil #1116

Merged
merged 2 commits into from Oct 6, 2021
Merged

feat:no need to store nil #1116

merged 2 commits into from Oct 6, 2021

Conversation

tylitianrui
Copy link
Contributor

I dont think it is necessary to store key & value into userdata ,when value is nil .

  • method Get will return nil , if key does not exist. same result with not storing key & value into userdata .
  • there is not a flag indicates whether value was found in the userdata . for example func (d *userData) Get(key string) (value interface{} , exist bool )

@erikdubbelboer erikdubbelboer merged commit f307299 into valyala:master Oct 6, 2021
@erikdubbelboer
Copy link
Collaborator

Thanks! Nice optimization.

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

2 participants