[Paper Review] Dismantling DivSufSort
This paper provides the first comprehensive academic description of DivSufSort, the fastest known suffix sorting algorithm in main memory, and introduces an extension that computes the LCP-array during the sorting process. By integrating LCP construction into the inducing phase of DivSufSort, the method achieves competitive performance with the fastest known LCP-array construction algorithms, outperforming existing inducing-based approaches and rivaling the state-of-the-art Φ-algorithm.
We give the first concise description of the fastest known suffix sorting algorithm in main memory, the DivSufSort by Yuta Mori. We then present an extension that also computes the LCP-array, which is competitive with the fastest known LCP-array construction algorithm.
Motivation & Objective
- To provide a clear, concise, and accessible academic description of DivSufSort, an algorithm widely used in practice but previously undocumented in the literature.
- To extend DivSufSort to compute the LCP-array during suffix array construction, enabling efficient text indexing pipelines.
- To demonstrate that the extended DivSufSort implementation is competitive with the fastest known LCP-array construction algorithms.
- To link the algorithmic components of DivSufSort to their corresponding source code lines and to prior work, enhancing reproducibility and understanding.
- To explain the performance advantages of DivSufSort over SAIS, particularly in terms of sorting strategy and memory access patterns.
Proposed method
- The paper reverse-engineers the DivSufSort source code (over 1,000 lines) to provide a formal, step-by-step description of its algorithmic logic.
- It introduces a novel extension that computes the LCP-array during the inducing phase of suffix array construction, reusing the same data structures and avoiding additional passes.
- The method leverages the classification of suffixes into A-, B-, and B*-types to guide the sorting and induction process, reducing unnecessary operations.
- It employs repetition detection and prefix-doubling-like techniques to optimize the initial sorting of non-inducible suffixes.
- The LCP construction is integrated into the inducing phase by tracking the longest common prefix between adjacent suffixes in the SA, using the same SA construction framework.
- Empirical evaluation is conducted on standard test datasets, comparing runtime against state-of-the-art LCP and suffix array construction methods.
Experimental results
Research questions
- RQ1Why is DivSufSort significantly faster than other suffix sorting algorithms like SAIS, despite its lack of academic documentation?
- RQ2Can the LCP-array be efficiently computed in conjunction with the suffix array using the same algorithmic framework as DivSufSort?
- RQ3How does the performance of the extended DivSufSort compare to existing LCP-array construction algorithms, including the Φ-algorithm and inducing-based methods?
- RQ4What are the key algorithmic optimizations in DivSufSort that contribute to its high performance in practice?
- RQ5How can the internal logic of DivSufSort be formally described and linked to its source code for reproducibility and further development?
Key findings
- The extended DivSufSort implementation computes the LCP-array during the suffix array construction phase, achieving competitive performance with the fastest known LCP-array construction algorithms.
- On average, the new method is faster than the only other inducing-based LCP construction approach, and in some cases even outperforms the Φ-algorithm, the current state-of-the-art for pure LCP construction.
- For 200 MB of DNA data, the extended DivSufSort completes LCP construction in 33.47 seconds, outperforming the next best method (28.06 seconds) by a small but measurable margin.
- The performance advantage of DivSufSort over SAIS is attributed to its use of a non-recursive, string-sorting-based initial phase and a more efficient induction process that avoids reprocessing A-suffixes.
- The method reduces memory access overhead by skipping regions of the SA that contain only A-suffixes during the first induction phase, improving spatial locality.
- Empirical results on diverse datasets (DNA, English, XML, proteins) confirm consistent performance gains across different data types and sizes.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.