-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
reader: Improve performance of read_all #441
Open
wcampbell0x2a
wants to merge
2
commits into
master
Choose a base branch
from
439-improve-read-all-perf
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wcampbell0x2a
force-pushed
the
439-improve-read-all-perf
branch
3 times, most recently
from
May 19, 2024 06:19
c9d336a
to
43dbdfb
Compare
Benchmark for b49a65cClick to view benchmark
|
Benchmark for 7f81f7bClick to view benchmark
|
Benchmark for 42291ccClick to view benchmark
|
Benchmark for a473082Click to view benchmark
|
wcampbell0x2a
force-pushed
the
439-improve-read-all-perf
branch
from
May 19, 2024 15:04
43dbdfb
to
696adb2
Compare
Benchmark for e1f913aClick to view benchmark
|
Benchmark for 8c98ec9Click to view benchmark
|
wcampbell0x2a
force-pushed
the
439-improve-read-all-perf
branch
2 times, most recently
from
May 22, 2024 03:27
833f696
to
558ed33
Compare
Benchmark for d2397b4Click to view benchmark
|
Benchmark for 9ff94ecClick to view benchmark
|
wcampbell0x2a
force-pushed
the
439-improve-read-all-perf
branch
from
May 22, 2024 03:42
558ed33
to
0b22526
Compare
wcampbell0x2a
changed the title
DRAFT: reader: Improve performance of read_all
reader: Improve performance of read_all
May 22, 2024
For reference, not as perf as it was ;)
|
Benchmark for bd2a83cClick to view benchmark
|
Hmmm, my inline(never) hurt the performance of the count vs read_all. I might have to balance this..
|
Or! Just take the improvements and go to sleep ;) |
* Add Leftover::{Byte, Bits}, so that instead of conversion straight away into a Bitvec, we keep it as a slice instead. In the case of the read_all attribute this improves the speed, as reading until EOF doesn't keep causing our reader to convert to bits and back again all the time. * This _does_ result in some slowdown, but with some #[inline(never)] we can keep it to a minimum. The total gain to read_all speed is worth any .8 ms slowdown I saw in testing.
* This was causing issues with bit_size of buf, and BitSize already takes care of this
wcampbell0x2a
force-pushed
the
439-improve-read-all-perf
branch
from
May 25, 2024 16:16
0b22526
to
03ff770
Compare
Benchmark for 5f329baClick to view benchmark
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Leftover::{Byte, Bits}, so that instead of conversion straight away
into a Bitvec, we keep it as a slice instead. In the case of the read_all
attribute this improves the speed, as reading until EOF doesn't keep
causing our reader to convert to bits and back again all the time.
This does result in some slowdown, but with some #[inline(never)]
we can keep it to a minimum. The total gain to read_all speed is
worth any .8 ms slowdown I saw in testing.
Closes #439