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

Magic number in the code #3955

Closed
zjwzte opened this Issue Mar 14, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@zjwzte
Copy link
Contributor

zjwzte commented Mar 14, 2018

I find a magic number 163 here:

buffers := pool.New(163, 100e6, 3, func(sz int) interface{} { return make([]byte, 0, sz) })

@fabxc I notice that you wrote the original code. Could you please explain a bit about this number? I guess 163 might be a typo and it should be 1e3. If so, I'd like to sent a patch to fix it :)

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Mar 14, 2018

Yea, that's a typo and was supposed to be 1e3 similar to the second argument.

@zjwzte

This comment has been minimized.

Copy link
Contributor Author

zjwzte commented Mar 15, 2018

@fabxc thanks for confirmation! PR #3968 sent :)

@fabxc fabxc closed this in #3968 Mar 28, 2018

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.