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

optimized memory alloc #35

Merged
merged 2 commits into from
Jun 7, 2019
Merged

optimized memory alloc #35

merged 2 commits into from
Jun 7, 2019

Conversation

kazeburo
Copy link
Owner

@kazeburo kazeburo commented Jun 6, 2019

reduce memory alloc in header copy.
I saw golang/go#29915.

use io.copybuffer & sync.pool to response.

@kazeburo kazeburo changed the title optimze memory alloc optimized memory alloc Jun 6, 2019
@kazeburo
Copy link
Owner Author

kazeburo commented Jun 6, 2019

new

Concurrency Level: 10
Time taken for tests: 0.691 seconds
Complete requests: 10000
Failed requests: 0
Keep-Alive requests: 10000
Total transferred: 8869779 bytes
HTML transferred: 6120000 bytes
Requests per second: 14471.59 [#/sec] (mean)
Time per request: 0.691 [ms] (mean)
Time per request: 0.069 [ms] (mean, across all concurrent requests)
Transfer rate: 12535.14 [Kbytes/sec] received

current

Concurrency Level: 10
Time taken for tests: 0.765 seconds
Complete requests: 10000
Failed requests: 0
Keep-Alive requests: 10000
Total transferred: 8869768 bytes
HTML transferred: 6120000 bytes
Requests per second: 13070.44 [#/sec] (mean)
Time per request: 0.765 [ms] (mean)
Time per request: 0.077 [ms] (mean, across all concurrent requests)
Transfer rate: 11321.46 [Kbytes/sec] received

@kazeburo kazeburo merged commit a0a30c8 into master Jun 7, 2019
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.

1 participant