Skip to main content

BASE_INDEX

Constant BASE_INDEX 

Source
pub const BASE_INDEX: [u8; 256];
Expand description

Lookup table: maps ASCII byte to base index. 0=A, 1=C, 2=G, 3=T, 4=N, 5=other

Using a lookup table instead of match/if-else eliminates branch misprediction on random DNA data (where each branch has ~25% probability, the worst case for branch predictors).