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

tune ByteStringInputStream for composites #1175

Merged
merged 1 commit into from
May 21, 2020

Conversation

brharrington
Copy link
Contributor

Adjusts the ByteStringInputStream to work better for composite
ByteString objects. Before it was using asByteBuffer which
forces a compaction on composite types. Now it uses the
asByteBuffers method. This results in a large reduction in
allocations and increase in throughput.

Throughput

Benchmark Before After % Delta
compositeInputStream 31.8 137.6 332.9
compositeToArray 44.6 46.2 3.5
inputStream 115.1 126.5 9.9
toArray 42.8 45.0 5.2

Allocations

Benchmark Before After % Delta
compositeInputStream 104,887,113.5 69,769.8 -99.9
compositeToArray 104,875,451.8 104,875,038.6 -0.0
inputStream 8,418.3 7,987.6 -5.1
toArray 104,874,398.1 104,874,682.8 0.0

Adjusts the ByteStringInputStream to work better for composite
ByteString objects. Before it was using `asByteBuffer` which
forces a compaction on composite types. Now it uses the
`asByteBuffers` method. This results in a large reduction in
allocations and increase in throughput.
@brharrington brharrington added this to the 1.7.0 milestone May 20, 2020
@brharrington brharrington requested a review from jfz May 20, 2020 19:13
@brharrington brharrington merged commit c4eeb2a into Netflix:master May 21, 2020
@brharrington brharrington deleted the bsis branch May 21, 2020 01:31
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