-
Notifications
You must be signed in to change notification settings - Fork 554
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
performance increase in alignment #279
base: master
Are you sure you want to change the base?
Conversation
Hi @BrettDong, thank you so much for your review. Yes, I do know that best regards, |
Thank you a lot for your detailed explanation! After I incorporated these three lines of changes my application seem to get stuck in an infinite loop inside BWT but if I restore these three lines the problem immediately disappears. Therefore I thought the problem arose from the equivalence got broken. Now the culprit must lie somewhere else. |
Can you provide instructions how to reproduce this? Like what exact command are you running on what exact input files? |
Seems the reason of the problem I encountered is the compiler doing aggressive inline and y = ((c&2)? y : ~y) >> 1 & ((c&1)? y : ~y) & 0x5555555555555555ull; this line overwrites content in |
The function takes y by value, so it should not change the array. Do you think it is a bug in your compiler? |
I think I was encountering a compiler bug. So sorry for my impulsive comment above. Your changes are indeed mathematically equivalent and should not break the behaviour of the program. |
Some changes which result in a performance improvement of about 1.5%
I know it makes the code less readable. Only merge if you like it.