WIP Make LongSequence and LongSubSeq use Memory [DO NOT MERGE]#317
Draft
jakobnissen wants to merge 1 commit intoBioJulia:masterfrom
Draft
WIP Make LongSequence and LongSubSeq use Memory [DO NOT MERGE]#317jakobnissen wants to merge 1 commit intoBioJulia:masterfrom
jakobnissen wants to merge 1 commit intoBioJulia:masterfrom
Conversation
This makes these two data types more lightweight, requiring only two memory allocations (one for the sequence and one for its memory) as opposed to two. It also improves data locality since loading from the sequences won't require a double load through the indirection of `Vector`. The disadvanges are twofold: First, we lose support for Julia 1.10 since Memory was introduced in Julia 1.11 Second, Vector's code to grow its underlying memory is much more optimised and tested than the manual implementation here in BioSequences. This would matter if users did a lot of resizing operations on biosequences, like `push!` or so. However, I think they don't - they are instead much more likely to create a lot of sequences. If necessary, we can always implement better resizing / growth behaviour for these types.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #317 +/- ##
==========================================
- Coverage 90.87% 87.66% -3.22%
==========================================
Files 31 31
Lines 2400 2342 -58
==========================================
- Hits 2181 2053 -128
- Misses 219 289 +70
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This file contains hidden or 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
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.
This makes these two data types more lightweight, requiring only two memory allocations (one for the sequence and one for its memory) as opposed to two. It also improves data locality since loading from the sequences won't require a double load through the indirection of
Vector.The disadvanges are twofold:
First, we lose support for Julia 1.10 since Memory was introduced in Julia 1.11
Second, Vector's code to grow its underlying memory is much more optimised and tested than the manual implementation here in BioSequences. This would matter if users did a lot of resizing operations on biosequences, like
push!or so. However, I think they don't - they are instead much more likely to create a lot of sequences.If necessary, we can always implement better resizing / growth behaviour for these types.
TODO
pushfirst!is O(N)