Skip to content

Commit

Permalink
Slightly improve the sequence_runblock efficiency when there is only …
Browse files Browse the repository at this point in the history
…one block
  • Loading branch information
mourisl committed Jun 12, 2024
1 parent fd217db commit 1d1e0f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion compactds/Sequence_RunBlock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ class Sequence_RunBlock: public Sequence

size_t bi = i / _b ;
int type = _useRunBlock.Access(bi) ;
size_t ranki = _useRunBlock.Rank(type, bi) ;
//size_t ranki = _useRunBlock.Rank(type, bi) ;
size_t ranki = _b < _n ? _useRunBlock.Rank(type, bi) : 1 ;
size_t otherRanki = (bi + 1) - ranki ;

size_t ret = 0 ;
Expand Down
2 changes: 1 addition & 1 deletion defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

//#define DEBUG

#define CENTRIFUGER_VERSION "1.0.4-r149"
#define CENTRIFUGER_VERSION "1.0.4-r150"

extern char nucToNum[26] ;
extern char numToNuc[26] ;
Expand Down

0 comments on commit 1d1e0f2

Please sign in to comment.