Skip to content

Commit 4841c77

Browse files
committed
feat: change lookup table default size to 0 to prevent unexpected high memory usage for large alphabets.
1 parent 41a4f3b commit 4841c77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl<I: IndexStorage, R: TextWithRankSupport<I>> FmIndexConfig<I, R> {
3535

3636
/// The FM-Index stores a lookup table to skip the first `lookup_table_depth` many search steps
3737
/// when searching a query. The size of the lookup table grows exponentially in its depth,
38-
/// with the number of searchable alphabet symbols as base. The default is `8`.
38+
/// with the number of searchable alphabet symbols as base. The default is `0`.
3939
///
4040
/// For large texts like genomes and small alphabets like DNA alphabets with 4 searchable symbols,
4141
/// values up to around `13` might be reasonable choices.
@@ -73,7 +73,7 @@ impl<I: IndexStorage, R: TextWithRankSupport<I>> Default for FmIndexConfig<I, R>
7373
fn default() -> Self {
7474
Self {
7575
suffix_array_sampling_rate: 4,
76-
lookup_table_depth: 8,
76+
lookup_table_depth: 0,
7777
performance_priority: PerformancePriority::Balanced,
7878
_index_storage_marker: PhantomData,
7979
_block_marker: PhantomData,

0 commit comments

Comments
 (0)