Comments (4)
For both the C and rust code, the main reason for this constraint is the size of the backtrack array, which is a two dimensional array of i16
. I think that changing this to i32
would roughly double the memory usage and maybe cause some slowdown, but I don't know how much without measuring.
In addition to replacing i16
with i32
, you would need to change the AVX instructions that do the packing (_mm256_packs_epi32
). I'm reluctant to change the C code to do this, since then we stop being the same as upstream GKL, which is the main reason for having that C code there. However, it would be feasible to change the rust code and see how it affects performance.
from gkl-rs.
Hmm, I'm not sure I have that right... let me refresh my memory of how this works.
from gkl-rs.
I think the backtrack array only contains the insert/delete flags, so it could even be u8
. I added assert!(btrack <= 15);
here and it was never hit during the tests:
Lines 523 to 524 in 9eec442
So I don't think the backtrack array is the reason for the limit.
Instead, I'd be concerned about overflows in the 32-bit calculations in compute
, but I'd have to look closer to determine where they might occur.
from gkl-rs.
I think the only place that overflow can occur is here:
Line 350 in 9eec442
Underflow isn't a concern because we always take the maximum of two values, so it is limited by low_init_value
.
So the limit is that MAX_SW_SEQUENCE_LENGTH * MAXIMUM_SW_MATCH_VALUE
< i32::MAX
. Currently the code limits these values individually, but I don't see why we couldn't limit the product instead.
from gkl-rs.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gkl-rs.