Manuscript Offprint
arXiv:2610.33889Engineering Lightweight Burrows-Wheeler Transform Construction on the GPU via Prefix-Free Parsing
Abstract
The Burrows–Wheeler transform (BWT) is the core of many compressed full-text indexes and most read aligners. The fastest BWT constructions on GPUs need about 20 bytes of device memory per character, which severely limits the texts that can be processed there. For example, on our GPU with 24 GB device memory, this is only about 1 200 MiB. Prefix-free parsing (PFP) can be used to reduce the memory requirements of BWT construction algorithms in main memory. But, it uses hash tables and inverted lists which are not suited for GPUs. We show that PFP-based BWT construction can work with only sorting, scanning, or simple data-parallel procedures. This results in our GPU construction gpupfpbwt that on an NVIDIA RTX 3090, reduces the peak memory on an English text to 11.9 bytes per character. There, it can processes 2 108 MiB input files, which is 1.8 times larger than what the current state of the art libcubwt can handle. It is faster than or on par with libcubwt on eight of nine repetitive texts but 2.0 to 3.2 times slower on five of six non-repetitive ones, i.e., it provides a trade-off between required device memory and throughput.
2012 ACM Subject Classification Theory of computation → Data compression; Theory of computation → Sorting and searching
Keywords and phrases Burrows–Wheeler transform, prefix-free parsing, GPU, suffix sorting, memory-efficient algorithms
Related Version Based on M. Paris' Master's thesis [96].
Supplementary Material https://codeberg.org/kurpicz/gpupfpbwt (source code)
1 Introduction
The Burrows–Wheeler transform (BWT) [18] of a text is the sequence of the characters that precede the text’s suffixes in lexicographic order. It is reversible and used in compression [18, 77]. A BWT consists of maximal runs of equal characters, which can be stored in words. Here, each run is represented by its character and length. This makes a common measure of the compressibility of a text. Since the BWT supports pattern matching in compressed form, it is the core of compressed full-text indexes such as the FM-index [30], the r-index [39], and the move data structure [85]. These indexes are used read aligners such as Bowtie [64], BWA [68], and SOAP2 [69] (FM-index) and pangenome indexes such as MONI [102] (r-index), Movi [110], and Movi 2 [111] (move data structure).
The BWT can be construed by sorting all suffixes of the text, a data-parallel task that suits GPUs. The fastest GPU BWT construction, libcubwt [42], needs about 20 bytes of device memory per character. On a consumer GPU with 24 GB of memory, this limits libcubwt to texts of about 1 200 MiB, far below the size of the string collections and pangenomes that BWT-based indexes are built for. In main memory, PFP-BWT, the construction based on prefix-free parsing (PFP) [16], reduces the required working memory.
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
Our Contributions. We port prefix-free parsing to the GPU. Our key observation is that some structures, e.g., the hash tables and inverted lists of the original unnecessary. If all phrase occurrences are kept instead of the distinct phrases, we can obtain all necessary information just by sorting. Every step of our algorithm thus becomes a sort, a scan, or a simple data-parallel kernel. After the preliminaries (Section 2), related work (Section 3), and the original PFP-BWT algorithm (Section 4), we present
■ a formulation of PFP-BWT that consists of sorts and scans only (Section 5),
■ memory levels that need less memory than libcubwt (Sections 6.1 and 6.2.1),
■ two sorting cores and a space-saving configuration (Sections 6.3–6.5), and
■ an extensive experimental evaluation (Section 7).
For a base and a modulus , the Karp–Rabin fingerprint [52] of a string of length is . The fingerprints of all windows of a fixed length can be computed in one left-to-right scan with a rolling hash.
GPU Programming. A GPU executes a kernel with many thousands of threads. Up to 1 024 threads form a thread block, which runs on one streaming multiprocessor and shares its small on-chip shared memory. All threads access the device memory, whose bandwidth (936 GB/s on our GPU) is reached only if neighboring threads access consecutive memory. The device memory (24 GB on our GPU) is small compared to the host memory. We the peak resident device memory, i.e., the maximum number of bytes allocated on the GPU at the same time. Our algorithms combine kernels with the data-parallel primitives of CUB [81] and Thrust [7], e.g., prefix sums (scans), discarding, reductions, and radix sorts.
3 Related Work
Since the BWT follows from the suffix array in one scan, every suffix array construction algorithm (SACA) also constructs the BWT. We discuss BWT construction and suffix sorting on the GPU. Section A covers other models of computation, and a survey [11] covers further building blocks of full-text indexes that utilize the BWT.
BWT construction on the GPU. The first GPU BWT constructions transform the blocks of bzip2-like compressors [97, 24]. Zhao et al. [112] build the BWT of a human genome by blockwise suffix sorting [48], with the GPU sorting the suffixes of each block. Liu et al. [73] builds the BWT of large read collections on a GPU together with the CPU cores and on clusters of GPU nodes. The current state of the art, libcubwt [42] uses suffix sorting routines with the radix sort of CUB (Section 7). Closest to our work is Rapid-PFP [32], which computes the prefix-free parse on the GPU but not the BWT.
interior, so it must be v's start window:

×: last window of ends positions before the end of v
but : contradiction
Figure 1 Visualization of Lemma 1. The trigger string at the end of a proper prefix of would lie in the interior of the phrase .
×: start window of u would be a trigger window in the interior of v
Figure 2 Visualization of Lemma 2. The trigger string that starts a shorter phrase u would lie in the interior of v.
Suffix sorting on the GPU. GPU SACAs use prefix doubling on radix sorts [94], the skew algorithm [23, 71], hybrids of both [108], CPU–GPU hybrids [105], lexicographic naming [106], genome-specific techniques [98], and several GPUs connected by NVLink [17]. All of them sort all n suffixes of the text. We are not aware of one that uses induced sorting, the basis of the fastest sequential SACAs [2]. In general, the suffix array requires more device memory than the BWT. Beyond suffix sorting, other building blocks of compressed indexes have been engineered for GPUs, such as minimal perfect hash functions [10] and wavelet trees [99, 36].
4 Prefix-Free Parsing and the Original PFP-BWT
Boucher et al. [16] introduce a BWT construction algorithm based in prefix-free parsing (PFP). IT replaces the suffix sort of the text by a sort of the distinct phrase suffixes, which are few for repetitive texts. Our GPU algorithm builds on their construction.
4.1 The Parse
PFP is parameterized by a window length and a set of trigger strings of strings of length . Two sentinel symbols and \, i.e., symbols smaller than every character of the alphabet, are prepended and appended. The parse is then computed on
A phrase is a substring of from the beginning of an occurrence of an element of to the end of the next one. Thus, a phrase has exactly one proper prefix and one proper suffix in and no other substring in . Consecutive phrases overlap by the characters. The dictionary is the set of distinct phrases. The parse is the sequence of the phrases in text order, each identified by its lexicographic rank in .
4.2 The Structure of the Phrase Suffixes
The set S of phrase suffixes consists of the suffixes of length > w of the elements of D. Every phrase suffix ends with the trigger string that ends its phrase. The following lemmas show why sorting S and the parse can replace the sort of all suffixes of T.
▶ Lemma 1 ([16, Lemma 1]). The set S is prefix-free.
If were a proper prefix of , the trigger string that ends would lie in the interior of a phrase that ends with , see Figure 1. Our algorithm also relies on the phrases being suffix-free, which is implicit in the proof of [16, Lemma 7].
▶ Lemma 2. Let with . Then is not a suffix of .
If were a suffix of , the element of that starts would occur in at offset . Since , this occurrence is neither a prefix nor a suffix of , which contradicts the definition of a phrase, see Figure 2. We now can sort strings based on their phrase suffixes, because by Lemma 1, and differ within their first characters.
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
▶ Lemma 3 ([16, Lemma 2]). Let . Then for all strings and .
We now map all suffixes of length > w of the text to a phrase suffix. Let v be the phrase that starts with the last occurrence of an element of at or before the start of x. The prefix of x that ends where v ends is a suffix of v longer than w, hence in S. It is also the only one.
▶ Lemma 4 ([16, Lemma 3]). Every suffix x of #T with |x| > w has exactly one prefix in S, which we denote by .
We can then use the mapping to sort suffixes of the text based on the lexicographical order of the phrase suffixes.
▶ Lemma 5 ([16, Lemma 4]). Let and be suffixes of with . Then implies .
This is Lemma 3 applied to and . Suffixes with form a block of . In suffix order, the blocks appear in the order of . Therefore, sorting sorts the suffixes of the text up to the order inside each block. Further copies of #Ttakes the place of the smallest suffixTw$ and start with phrase suffixes.
▶ Lemma 6 ([16, Lemma 5]). The permutation that sorts , ..., , #T also sorts the suffixes , ..., , .
4.3 From the Dictionary and the Parse to the BWT
Boucher et al. map every character to the phrase suffix that starts the next suffix . This is for , ) for , and ) for , the final \. By Lemmas 5 and 6, the BWT consists of the characters mapped to the phrase suffixes, block by block in the order of . We consider the order within a block.
▶ Lemma 7 ([16, Lemma 6]). Assume that maps copies of the character to and no other characters. Additionally, it maps a total of characters to phrase suffixes smaller than . Then, the BWT characters at positions are copies of .
The block of occupies exactly these positions, and their order does not matter if all characters are equal. We call the output offset of and such a phrase suffix easy. Whether a phrase suffix is easy follows from and the phrase occurrences. If all phrases of which is a proper suffix have the same character before , then is easy. The run's length is the sum of the number of occurrences. Otherwise, is hard, and the order inside its block matters. Since the last characters of form the trigger string that starts the next phrase, the suffix of that starts at the next phrase describes the text after an occurrence of .
▶ Lemma 8 ([16, Lemma 7]). Let and be suffixes of that start with occurrences of . Also, let and be the suffixes of that encode the last characters of these occurrences of and the remainders of and . If , then .
Since occurs at both and , it does not end with the unique . Thus, and are nonempty. Their first difference lies in the first phrase in which and differ. Since the parse orders phrases by lexicographic rank, the characters of a hard block appear in the BWT in the order of the parse suffixes that follow their occurrences. If is a whole phrase, i.e., , the character before each of its occurrences is not part of but lies at distance from the end of the previous phrase, so the parse provides it. Hence, the BWT can be computed from and alone.

Figure 3 Data flow of Big-BWT on with and .
4.4 The Implementation Big-BWT
Big-BWT, the implementation of Boucher et al., consists of three sequential programs that communicate through files, see Figure 3. The first program slides a window of length w over the text and maintains its Karp–Rabin fingerprint with a rolling hash. When the fingerprint is 0, the current phrase ends with the window and the next phrase starts with it. Each finished phrase is looked up by its 64-bit hash in a hash table that stores the distinct phrases with their frequencies. Afterward, the dictionary is sorted, and the hashes in the parse are replaced by the ranks of their phrases. For every occurrence of whole phrases, they store, the character at distance from its end in an array stores. The second program computes SA( ) with SACA-K, writes the inverted list of every phrase, i.e., its occurrences in the order of the parse suffixes that follow them (cf. Lemma 8), and permutes W accordingly. The third program enumerates the phrase suffixes in lexicographic order with the suffix and LCP arrays of the concatenated dictionary (gSACA-K). For each phrase suffix , they collect the characters that precede in the phrases that end with it. If they are all equal, they write a run whose length is the sum of the phrase frequencies (Lemma 7). Otherwise, it merges the inverted lists of the phrases with a heap and writes the preceding character of each popped occurrence (Lemma 8), taken from W if is a whole phrase.
5 Our PFP-BWT Variant for the GPU
We now show how to replace the hash table, the inverted lists, W, and the heap by sorts and scans. Table 3 in Section C compares the steps of both algorithms. Our algorithm keeps the structure of the original, i.e., the parse, the blocks of Section 4.2, the order of S between blocks, the order of the parse inside hard blocks, and the easy/hard distinction of Lemmas 7 and 8. But all objects of the construction are derived from a single occurrence array with one entry per phrase occurrence, where (Section 5.1). is sorted in three orders: (1) in text order by the parsing (Section 5.1), (2) lexicographically by phrase for the dictionary and the parse (Section 5.2), and (3) lexicographically by reversed phrase for the phrase suffixes and their occurrences (Sections 5.3 and 5.4). Figure 4 shows the resulting data flow.
https://gitlab.com/manzai/Big-BWT, last accessed 2026-10-22.
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
dictionary phases: on the d occurrences of C (e, , payload)

suffix phases: on the s phrase suffixes, reading T and C
Figure 4 Data flow of gpupfpbwt in the configuration cub6 on with and . The top row shows the dictionary phases, the bottom row the suffix phases. NSV denotes next-smaller-value queries. In Sections 6.1 and 6.2, we define buckets, the MSD core, and the configurations. marks the last occurrence. The gaps ( ) are filled by the hard suffixes.
5.1 Parsing
We parse without prepending . Instead, is a trigger string. This keeps the text unchanged and yields the BWT directly in the convention of libcubwt, i.e., the character that precedes position 0 is . Let be the window length and a set of trigger strings of length . For , position is a trigger position if or . Let be the ends of the windows at trigger positions , the end of , and . Phrase is , of length . The occurrence array stores phrase as the entry , i.e., its end, its length, and a payload that initially is its text-order index.
The parse P, the dictionary D, and the phrase suffixes S are defined as in Section 4. We write for the suffix of length j of phrase k and for the character that precedes it. For , this is the character before phrase k. Phrase 0 starts with the trigger string . Every other phrase is delimited as in the original. Hence, Lemmas 1, 2, 4, and 5 hold for our parse, and Lemma 9 below adapts Lemma 8.
5.2 Dictionary, Parse, and Parse Ranks
We sort a copy of C by phrase content read left to right, breaking ties by length (LR order). We mark every occurrence whose phrase differs from that of its predecessor and propagate the group starts by pointer jumping. Each group of equal phrases then receives its lexicographic rank, i.e., its identifier in P. Each occurrence of the copy writes its identifier to the payload of C[k], where k is its text-order index. Now, reading the payloads in text order yields P. The dictionary is never materialized and the frequency of a phrase is the size of its group.
We compute SA(P) by prefix doubling on rank pairs. Here, the payload is overwritten as follows. Occurrence k gets its parse rank, i.e., the rank of the parse suffix starting at . The last occurrence gets the sentinel rank , which is smaller than all other ranks. Ordering occurrences by their payload thus orders them by the text that follows them.
▶ Lemma 9. Let , and let be occurrences whose phrases end with . The suffix of that starts with the occurrence of at the end of phrase is smaller than the one for phrase if and only if the payload of is smaller than that of .
Proof. For , let be the suffix of that starts with phrase . Neither nor is the last occurrence , i.e., the only phrase that contains \. If it ended with , then would be preceded by at least one character. Such a string occurs only once in Hence, the payloads of and are the ranks of the nonempty parse suffixes and among all suffixes of .
Now, let . Phrase starts characters before the end of phrase . The suffix that starts with the occurrence of in and are therefore and . Both differ in and do. We now show that if and only if for . Every phrase is an element of , so the phrases are prefix-free (Lemma 1). Let be the first index with . The text consists of phrase followed by every later phrase without its first characters. The first distinct phrases and differ at a position inside both. Hence, holds if and only if , i.e., if and only if . With and , and are ordered correctly by the order of their payloads.
5.3 Phrase Suffixes and Their Occurrence Sets
A second sort of yields the phrase suffixes and the occurrences that end with each of them. We sort by phrase read right to left from , breaking ties by length and then by the preceding character . In this RL order, occurrences that share a phrase suffix are adjacent. Now, denotes an RL position, and , , , and refer to the occurrence at this position. Let be the length of the longest common suffix of the phrases at RL positions and . The suffixes with already end the phrase at position , and those with are not in . Position therefore generates only the remaining ones, i.e., for .
▶ Lemma 10. Let with . In the RL order, the occurrences with form a contiguous interval. The leftmost is the unique position in it with .
Proof. The RL order sorts occurrences by their reversed phrases . Occurrences with a common prefix are contiguous and have . Now, the common-prefix length with the predecessor is exactly at the start of a run sharing a prefix of length .
By Lemma 10, this generation produces each element of exactly once, at its leftmost occurrence. Each of the elements is represented by a triple containing its leftmost RL occurrence , its length , and its interval length , where is its occurrence interval. Here, is the next position with , which can be found by a next-smaller-value (NSV) query on . Finally, the triples are sorted by the strings they represent.
5.4 Generating the BWT
A scan over the interval sizes of the sorted phrase suffixes yields the output offset of every phrase suffix. For a phrase suffix of length j with interval , the classification in easy and hard is a comparison of and .
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
▶ Lemma 11. Let be the interval of with . Then . Thus, all occurrences of are preceded by the same character if and only if .
Proof. Let be the phrase at RL position . By Lemma 2, either for every , or for every such and all these occurrences carry the same phrase. In the first case, is the character that follows in . Since the RL order is lexicographic on reversed phrases, the sequence is nondecreasing. In the second case, all reversed phrases and all lengths are the same. Hence, they are sorted by their last tie-break, which is exactly .
If they are equal, the phrase suffix is easy and contributes a run of copies of that character. Otherwise, it is hard and its occurrences are sorted by the parse rank in their payload, and their preceding characters are written in this order. Whole phrases need no special case, since is read from the text like every other preceding character.
▶ Theorem 12. Processing the elements of S in lexicographic order and outputting, for each element , the preceding characters of its interval , as a run when and ordered by the parse rank in the payload otherwise, produces BWT(T).
Proof. The suffixes of that start in are partitioned into the blocks of the phrase suffixes, ordered by the lexicographic order of (Lemmas 4 and 5). The block of consists of the occurrences in its interval (Lemma 10). Hence, the interval sizes sum to , and their prefix sums are the correct block starts. Inside a block, the order is that of the parse ranks in the payload (Lemma 9). When all preceding characters coincide, the order inside the block is irrelevant (Lemma 7), which is exactly the easy case of Lemma 11. Finally, since we do not prepend and read cyclically, the suffix starting at position 0 is preceded by , and no \ is output.
The Primary Index. As a drop-in replacement for libcubwt, our construction must also return the primary index q with SA[q] = 0. We derive q after the classification, while the sorted triples and the parse ranks are still available. Let be the RL position of the occurrence with the smallest end, i.e., of phrase 0, and let be its length. The suffix starting at 0 begins with the element of S of length whose interval contains , see Figure 5.
▶ Lemma 13. Let be the element of that is a prefix of the suffix starting at text position 0, its interval, and its output offset. Then , where rank is the parse rank in the payload.
Proof. The positions of BWT that belong to the occurrences of form the interval (Theorem 12). Within it, the occurrences appear in increasing order of their parse rank. This holds both for easy intervals and for hard ones. The position of occurrence is therefore plus the number of occurrences in the interval with a smaller rank.
6 Engineering PFP-based BWT Construction on the GPU
A simple direct implementation of the algorithm needs far more memory than libcubwt. We therefore show how to minimize the peak resident device memory in practice. The input text and the output take n bytes each, i.e., we only consider byte alphabets. We also limit the input to at most 4 GiB, as this covers GPUs with up to 40 GiB memory but allows us to use

rows of in increasing parse rank:
example, BWT of T:
| q | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| G | G | G | G | G | T | A | A | T | T | T | T | C | G | A | C |
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
: phrase 0 at RL position 5
, no other occurrence:
Figure 5 The primary index. The occurrences in map to the BWT positions in increasing parse rank, here (top). In with and , with and , so (bottom).
32-bit indices. The occurrence array takes bytes for its entries of three 4-byte values on all realistic inputs. Each phrase suffix is stored as a 10-byte triple. Later, we show that the suffix sort can processes buckets of suffixes with the same first character separately.
6.1 Improving the Memory Footprint
In the baseline (opt 0), the suffix sort is a character-by-character refinement. For a suffix with phrase end and length , the padded character sequence is for and 0 otherwise. The order is the lexicographic order on padded sequences, with ties broken by length. For each unfinished suffix we need a position and a rank. Maximal runs of equal rank form rank groups. In the th iteration, we refine the groups by , sorting -blocks of elements with histogram slots each. A group that fits into one block is finished by a bitonic sort in shared memory. After every iteration, we discard [22, 13, 34, 35] the finished suffixes. The refinement maintains two invariants. At every compaction point, every unfinished suffix satisfies the following.
(I1) , counted over all suffixes, finished or not. Thus, the rank is constant on a group, and once a group is ordered internally, its member (counted from 0) has the final position .
(I2) After iteration , all members of a rank group agree on .
Let be the number of unfinished suffixes at the start of iteration and the number of -blocks that cover the rank groups. The baseline keeps thirteen arrays of length , i.e., 56 bytes per suffix consisting of the triples (10 bytes) with cached phrase ends , the suffix ends (4 bytes), the sorting state (16 bytes) with two cached 8-byte words of upcoming characters (16 bytes), and output arrays for the sorted triples (10 bytes). They are allocated before the memory of the interval computation is freed. Three auxiliary buffers hold histogram slots of 4 bytes per block, so each needs bytes in iteration . A group gets blocks. Since the buffers only grow they may need up to bytes, see Figure 6.
Allocation hygiene To improve this, we allocate the 42 bytes per element of sorting state and output arrays only after the -byte memory of the interval computation is freed. To this end, we obtains every Thrust temporary from one cached allocator.
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
(a)
(b)

Figure 6 Memory profile of the baseline. (a) Groups of 2 or 3 elements occupy a whole block and its histogram slots. (b) The byte peak.
level 0
groups, elements
blocks, slots
level 2
groups, elements
: finalized
before block formation
blocks, slots
Figure 7 Block formation at level 0 and when finishing small group early .
Finishing small groups early. Next, we finalize small groups before they receive a block. After each discarding, one 64-thread block per group sorts every group of at most B elements in shared memory and writes it to the output arrays. A second discarding step removes these groups before the blocks and histogram slots of the next iteration are created. Every group that still receives blocks then has more than elements. Hence, , and the three auxiliary buffers take at most bytes in total, see Figure 7.
Recomputations. Next, we drop the two cached 8-byte words of upcoming characters, as they can be recomputed from T and the suffix end.
▶ Lemma 14. For every suffix and iteration , the with and contains exactly the value that the baseline extracts from its cached 8-byte word, including all padding cases.
Proof. With the word base , the baseline loads the eight bytes at the positions for , replaces positions beyond by 0, packs byte at bit offset , and extracts byte . This is the value at position . The cached suffix end equals and is never modified.
MSD bucketing by the first character. In one most-significant-digit (MSD) step, we now partition the suffixes into buckets with one counting pass and one scatter. Sorting now happens one bucket at a time, starting at iteration . The sorting state is allocated once, for the entries of the largest bucket.
▶ Lemma 15 (Bucket decomposition). The order ↘ orders blockwise. Within each bucket, the loop started with and computes the correct final positions .
Proof. The character is never a padding character, since . Therefore, the buckets are contiguous in the order . The initialization makes the whole bucket one rank group with rank base , i.e., invariant (I1) for the group structure with one group per bucket. This

Figure 8 Per-suffix device memory of the suffix sort at level 0 and level 4 (Equation (1)). The s-terms are drawn to scale, the -terms for as in with and . The term is not to scale.
is because the suffixes outside the group that are smaller are in smaller buckets. Invariant (I2) holds for by construction. For , elements of different groups are never compared, making the buckets are independent. By invariant (I1), the bucket land in . These intervals are disjoint and cover .
Now, only the triples with their cached suffix ends, the output arrays, and the bucket permutation computed by the scatter (freed after the bucket loop) have entries. The four sorting-state arrays and the auxiliaries have entries. Together with , the input, the BWT output, and 20-byte block descriptors for blocks, the device memory resident during the suffix sort is at most
At the beginning, the bound is bytes, with , see Figure 8. Let be the most frequent first character's relative frequency. Then and the sum reduces from at least 44s bytes to bytes. On the Pizza&Chili text english ( ) we could more than halve the peak, see Table 1 in Section 7.
6.2 Performance improvements
In the previous section, we up to halved the memory requirements of our implementation. Unfortunately, this also reduced the performance significantly. Now, we show, how to improve the throughput while also slightly improving the memory requirements.
6.2.1 In-Place Bucketed Output
Up till now, we have kept two copies of the triples, i.e., the unsorted arrays that the refinement reads and the output arrays to which it writes finished suffixes. We now remove the second copy. First, a stable least-significant-digit pass (a histogram, a scan, and a scatter through one 4-byte and one 2-byte temporary) moves the triples of each first-character bucket into a contiguous slice. Second, consecutive buckets form chunks of at most suffixes ( by default). A finished suffix records its final rank in a per-chunk permutation instead of copying its triple. Once a chunk is sorted, the permutation is applied in place to its slice. Third, the easy/hard classification replaces its three 4s-byte prefix-sum auxiliaries by one byte per suffix.
On skewed inputs, the largest first-character bucket dominates the chunk size. Therefore, we presort by the first two characters (65 536 buckets, via a second stable pass). This bounds by the frequency of the most frequent bigram. Now, the bucketing pass holds the triples (10s bytes), the two temporaries (6s), C, the input, and the output, i.e.,
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
memory (schematic, not to scale)

Figure 9 Memory usage of the suffix phases during the bucketing pass and during the chunk-by-chunk sort as described in Section 6.2.1.
bytes. During the sort, the triples, the cached suffix ends (4s), and the sorting state of the chunk are required. The sorting state takes 28 bytes per chunk slot for the refinement of Section 6.1 (the refinement core) and 44 for the MSD sort introduced next in Section 6.3. With the MSD sort, the memory during the sorting is bytes. For K = 256 and chunks of suffixes, the bucketing is the peak of the suffix phases unless a single bucket exceeds s/22, i.e., 4.5% of S, see Figure 9.
6.3 MSD Radix Sort
Now, we let the MSD radix sort compare eight characters per round with two stable radix-sort passes of CUB. We use it for both dictionary sorts, i.e., the LR and the RL sort of C and also for the suffix chunks. Every active element carries a rank and a character offset. A round sorts the elements by the 8-character key at their offset (padded with 0) and, stably, by rank, so that equal keys within a rank group become adjacent. Two max-scans mark group starts and runs of equal keys. Every run receives the rank “group rank + run start – group start”. In the RL dictionary sort, the key of an exhausted phrase is its preceding character, which we can use as tie-break without a separate pass. This needs 44 bytes of space per chunk.
A round costs a fixed part (eight kernel launches, three scans, and one host synchronization) plus a part proportional to the number of active elements. A chunk needs rounds, where is the length of the longest common prefix of two of its suffixes.
A small input has not to be split into chunks. We therefore set the chunk size to instead of , at a negligible bytes of additional space.
Suffixes with long common prefixes spend one round per eight shared characters. After the discarding step, every remaining suffix therefore compares the 8-byte words that follow its key with those of the first element of its rank group, up to the first difference or 32 words. The group minimum of these counts, computed with an atomicMin at the group's first index, advances the offset of every member by further characters, see Figure 10.
▶ Lemma 16. Let be a rank group after the compaction of a round, with all members at offset . Let be the minimum over of the number of consecutive 8-byte words of from offset on that equal the corresponding words of the first member of . Advancing the offset of every member of to does not change the sorted order computed by the subsequent rounds.
Proof of Lemma 16. By invariant (I2), which the MSD sort maintains like before. For and any word index , the ith words of and of both equal that of . Hence,

Figure 10 LCP skipping in a rank group G at offset (schematic). Equal words are shaded and marked =, up to the first differing word ( ). With the minimum count , all members advance to the offset .
x and y agree on all characters in . The order of under is therefore decided by the characters from on and the length rule.
6.4 Saving More Space
Before, the bytes, 4s bytes are taken by the interval lengths and the temporary through which they are permuted. On repetitive inputs, the dictionary sorts determine the peak, c.f., Section 7. We now reduce this even further. To this end, we first compute the interval lengths only after the suffix sort, as described in Section 5.3. In phrase-sequential order, i.e., by RL position and then it, by increasing suffix length. This lowers the bucketing cost to bytes. After the sort, bytes are used. Second, before, we run both dictionary sorts over all d entries at once, with 44d bytes of memory next to the 36d bytes of C and its copies. Now, we bucket the entries by their first (LR sort) or last (RL sort) two characters with a stable 16-bit radix sort instead. We sort consecutive buckets in 16 chunks, with initial ranks set to the bucket starts and the first round at offset 2. Equal phrases share a bucket and keep their relative order.
6.5 Prefix-Doubling
Even with LCP skipping, the MSD sort needs up to rounds for a common prefix of length , each of which pays the fixed cost. During the suffix sort replaced by prefix doubling [75, 66], which needs rounds. For a suffix and a distance , doubling needs the rank of the suffix that starts characters later. We sort a text instead of the set . The dictionary text is the concatenation of the phrases that generate at least one element of , in RL order followed by a separator 0. Every element of is a suffix of at a position that follows from its phrase and length.
▶ Lemma 17. For two elements of at positions and of , if and only if .
Proof. Since is prefix-free (Lemma 1) and contains every distinct phrase suffix once, and differ at a position within , where both orders compare the same characters.
Hence, any suffix array construction for yields the order of . Round 0 uses 64-bit keys that pack characters of bits, where is the width of the largest character of . It computes the ranks after the first characters. The rank of a run of equal keys is its first index. The positions in runs of size at least two form the active list. In the doubling rounds
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
Table 1 The inputs with their size, alphabet size , number of BWT runs , and . The left part lists the non-repetitive texts and the right part the repetitive ones.
| text | MiB | text | MiB | ||||||
|---|---|---|---|---|---|---|---|---|---|
| dblp.xml | 282.4 | 97 | 41 037 553 | 7.2 | cere | 439.9 | 5 | 11 574 639 | 39.9 |
| dna | 385.2 | 16 | 243 492 866 | 1.7 | coreutils | 195.8 | 236 | 4 684 458 | 43.8 |
| english | 2 108.0 | 239 | 658 301 008 | 3.4 | einstein.de.txt | 88.5 | 117 | 101 369 | 915.1 |
| pitches | 53.2 | 133 | 23 429 976 | 2.4 | einstein.en.txt | 446.0 | 139 | 290 237 | 1 611.2 |
| proteins | 1 129.2 | 27 | 441 858 468 | 2.7 | Escherichia_Coli | 107.5 | 15 | 15 044 485 | 7.5 |
| sources | 201.1 | 230 | 47 896 806 | 4.4 | influenza | 147.6 | 15 | 3 022 820 | 51.2 |
| kernel | 246.0 | 160 | 2 791 366 | 92.4 | |||||
| para | 409.4 | 5 | 15 636 738 | 27.4 | |||||
| world_leaders | 44.8 | 89 | 573 485 | 81.9 |
, the active positions are sorted by the 64-bit key (rank[i], rank[i + h]), with rank 0 past the end. Within a group of equal old rank, every run of equal keys receives the rank “old rank + run start – group start”. Runs of size one are resolved before the ranks are written back.
7 Experimental Evaluation
In this section, we compare our implementation the improvements presented in Section 6 with the current state-of-the-art GPU-based BWT construction algorithm libcubwt. We denote the baseline implementation as op0. The configurations opt1 to opt4 add the allocation hygiene, finish small groups early, recomput instead of cache, and use MSD bucketing, respectively, see Section 6.1. Configurations opt5 and opt6 use the in-place bucketed output without and with presorting by two characters (Section 6.2.1). When we use the more sophisticated MSD radix sort (Section 6.3) with opt5 and opt5, this is denoted by cub5 and cub6, resp. We use fast to denote a version of cub6 that sacrifices some space savings for more performance. The space-efficient configuration (Section 6.4) is denoted by space and the prefix doubling approach (Section 6.5) for the suffix sorting by dbl.
Setup. All experiments run on an NVIDIA GeForce RTX 3090 under CUDA 12.6. The reported times cover the whole construction from host input to host output. Every reported time is the median of three runs and validated against a main memory BWT construction algorithm [41]. The inputs are the texts of the Pizza&Chili corpus [31], see Table 1 for more details. To find the largest input that a configuration handles, we run it on prefixes of every input, from 64 MiB in steps of 25% up to the whole file.
Largest inputs. Our our best configurations process all 15 inputs completely. libcubwt process 14 of the 15 inputs and failed on english. Here, libcubwt handles prefixes of up to 1 164 MiB, whereas we process the whole 2 108 MiB, i.e., 1.8 times as much. libcubwt needs 20.4 bytes per character on every input and size, cub6 6.1 to 17.0, and space 5.9 to 14.6 at the largest size they handle.
Comparison with libcubwt. Table 2 compares fast, cub6, space, and dbl with libcubwt at the largest size that all five handle. The space-time trade-off is visualized in Figure 11. Figures 12 and 13 show the throughput over all sizes and the space-time points. On the

peak memory [bytes / input byte]
peak memory [bytes / input byte]
peak memory [bytes / input byte]
opt0
opt1
opt2
opt3
opt4
opt5
opt6
cub6
cub5
fast
space
dbl
Escherichia_Coli (107 MiB)

cere (440 MiB)
einstein.de.txt (88 MiB)
einstein.en.txt (446 MiB)
coreutils (196 MiB)
influenza (148 MiB)
kernel (246 MiB)
para (409 MiB)
world_leaders (45 MiB)
peak memory [bytes / input byte]
peak memory [bytes / input byte]
peak memory [bytes / input byte]
opt0
opt1
opt2
opt3
opt4
opt5
opt6
cub5
star
cub6
fast
space
dbl
Figure 11 Pareto front (dashed) of peak memory per input character (x-axis) and time (y-axis) of all configurations at the largest size that all of them handle.
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
Table 2 Time relative to libcubwt (, lower is better) and peak memory in bytes per input character (B/n, lower is better) at the largest size all five handle. Here is the time of libcubwt, which needs 20.4 bytes per character throughout.
| text | MiB | [s] | fast | cub6 | space | dbl | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| B/n | B/n | B/n | B/n | |||||||
| dblp.xml | 282.4 | 0.45 | 1.84 | 25.7 | 1.99 | 7.5 | 2.25 | 7.5 | 3.29 | 14.1 |
| dna | 385.2 | 0.55 | 3.10 | 45.8 | 3.22 | 13.5 | 3.56 | 11.6 | 3.65 | 22.9 |
| english | 381.5 | 0.59 | 2.76 | 48.8 | 2.74 | 11.9 | 2.99 | 11.7 | 3.28 | 20.4 |
| pitches | 53.2 | 0.08 | 5.83 | 55.2 | 13.73 | 17.0 | 14.68 | 14.6 | 4.37 | 22.3 |
| proteins | 596.0 | 0.91 | 2.68 | 35.7 | 2.97 | 15.4 | 3.31 | 11.1 | 3.16 | 17.2 |
| sources | 201.1 | 0.30 | 2.39 | 32.9 | 2.47 | 11.6 | 2.76 | 9.9 | 3.17 | 16.7 |
| cere | 439.9 | 3.12 | 0.49 | 16.8 | 0.49 | 16.8 | 0.52 | 12.6 | 0.52 | 12.6 |
| coreutils | 195.8 | 0.68 | 0.90 | 8.3 | 1.04 | 8.3 | 1.12 | 6.3 | 0.80 | 6.3 |
| einstein.de.txt | 88.5 | 0.37 | 0.65 | 9.7 | 0.64 | 9.7 | 0.75 | 7.3 | 0.76 | 7.3 |
| einstein.en.txt | 446.0 | 1.83 | 0.98 | 13.3 | 0.98 | 13.3 | 1.03 | 9.7 | 0.96 | 9.7 |
| Escherichia_Coli | 107.5 | 0.25 | 1.76 | 11.9 | 1.76 | 11.7 | 1.89 | 8.6 | 1.71 | 9.6 |
| influenza | 147.6 | 0.39 | 1.04 | 9.8 | 1.04 | 9.8 | 1.16 | 7.3 | 1.19 | 7.3 |
| kernel | 246.0 | 0.86 | 0.77 | 9.7 | 0.77 | 9.7 | 0.82 | 7.3 | 0.84 | 7.3 |
| para | 409.4 | 1.80 | 0.70 | 13.8 | 0.69 | 13.8 | 0.74 | 10.1 | 0.74 | 10.1 |
| world_leaders | 44.8 | 0.47 | 0.20 | 6.1 | 0.20 | 6.1 | 0.27 | 5.9 | 0.28 | 6.8 |
non-repetitive inputs, libcubwt runs at 1.4 to 1.5 ns per character and is 2.0 to 3.2 times faster than cub6 (13.7 times on pitches). While fast performs better, it is still a factor of 1.8 to 3.1 (5.8 on pitches) slower than libcubwt. Additionally, it needs more space than libcubwt. However, on the repetitive inputs, libcubwt slows down to 2.2 to 10.0 ns per character. Here, cub6 is faster than libcubwt on five of the nine inputs (by a factor of up to 5 on world_leaders), on par on three (ratios 0.98 to 1.04), and slower only on Escherichia_Coli (1.76). Interestingly, the latter is the repetitive input with the largest s (0.10n) and the smallest n/r ratio. Here, also space is faster than libcubwt on the same five inputs, at 5.9 to 12.6 bytes per character on all nine. Overall, libcubwt thus remains the better choice for non-repetitive texts that fit into its memory. Our construction is preferable for repetitive and for larger texts.
Where the time goes. On the non-repetitive inputs, the suffix sort is the most expensive phase of cub6, with 39 to of the time. On english and dna, its rounds are work-bound, e.g., 571 rounds of 8.4ms on average on the whole english. On pitches, it needs 5485 rounds of 0.19ms on average, dominated by the fixed part. Hence, fast, with a single chunk and 737 rounds, and dbl, with 10 rounds (5 to 10 on all inputs), are 2.4 and 3.1 times faster than cub6 there. On english, however, dbl is 1.2 times slower than cub6 at every input size. On the repetitive inputs, the suffix sort takes only 2 to of the time. Still, the dictionary phases take 53 to . The parse-rank phase, i.e., the prefix doubling of SA(P), alone takes 38 to on cere, einstein.de.txt, einstein.en.txt, kernel, and para. This is due to all to phrase occurrences that have to be kept instead of the far fewer distinct phrases.

fast - cub6 - space ... libcubwt

einstein.de.txt
einstein.en.txt
influenza
kernel
para
world_leaders
input size [MiB]
input size [MiB]
fast - cub6 - space ... libcubwt
Figure 12 Throughput over input size of fast, cub6, space, dbl, configurations and libcubwt.
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing

pitches (53 MiB)
proteins (596 MiB)
sources (201 MiB)
peak memory [bytes / input byte]
peak memory [bytes / input byte]
peak memory [bytes / input byte]
fast
- cub6
space
× libcubwt
Escherichia_Coli (107 MiB)

cere (440 MiB)
einstein.de.txt (88 MiB)
einstein.en.txt (446 MiB)
coreutils (196 MiB)
influenza (148 MiB)
kernel (246 MiB)
para (409 MiB)
world_leaders (45 MiB)
peak memory [bytes / input byte]
peak memory [bytes / input byte]
peak memory [bytes / input byte]
fast
- cub6
space
× libcubwt
Figure 13 Peak memory per input character and time of fast, cub6, space, dbl, configurations and libcubwt at the largest size that all of them handle.
8 Conclusion
We gave a variant of the prefix-free-parsing-based Burrows–Wheeler transform construction algorithm that works well on the GPU. Additionally, we showed how to make this simple algorithm more memory efficient and engineer its performance using different sorting routine. Overall, we reduce the peak on english by a factor of four, so that a 24 GB GPU processes a 1.8 times larger prefix than with libcubwt. Unfortunately, this only works well for repetitive inputs. Here, our construction is faster than or on par with libcubwt on eight of nine inputs. On non-repetitive inputs, we are significantly slower, because the suffix sort is the bottleneck. On repetitive texts, the dictionary phases dominate, because they process all d phrase occurrences. Working on the distinct phrases plus a compact occurrence structure would improve this on these texts.
References
1 Enno Adler, Stefan Böttcher, Rita Hartel, and Cederic Alexander Steininger. IBB: Fast burrows-wheeler transform construction for length-diverse DNA data. In SEA, volume 338 of LIPIcs, pages 2:1–2:18. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.SEA.2025.2.
2 Johannes Bahne, Nico Bertram, Marvin Böcker, Jonas Bode, Johannes Fischer, Hermann Foot, Florian Grieskamp, Florian Kurpicz, Marvin Löbel, Oliver Magiera, Rosa Pink, David Piper, and Christopher Poeplau. SACABench: Benchmarking suffix array construction. In SPIRE, volume 11811 of Lecture Notes in Computer Science, pages 407–416. Springer, 2019. doi:10.1007/978-3-030-32686-9_29.
3 Uwe Baier. Linear-time suffix sorting - a new approach for suffix array construction. In CPM, volume 54 of LIPIcs, pages 23:1–23:12. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2016. doi:10.4230/LIPIcs.CPM.2016.23.
4 Hideo Bannai, Juha Kärkkäinen, Dominik Köppl, and Marcin Piatkowski. Constructing and indexing the bijective and extended burrows-wheeler transform. Inf. Comput., 297:105153, 2024. doi:10.1016/j.ic.2024.105153.
5 Markus J. Bauer, Anthony J. Cox, and Giovanna Rosone. Lightweight algorithms for constructing and inverting the BWT of string collections. Theor. Comput. Sci., 483:134–148, 2013. doi:10.1016/j.tcs.2012.02.002.
6 Djamal Belazzougui. Linear time construction of compressed text indices in compact space. In STOC, pages 148–193. ACM, 2014. doi:10.1145/2591796.2591885.
7 Nathan Bell and Jared Hoberock. Thrust: A productivity-oriented library for CUDA. In Wen mei W. Hwu, editor, GPU Computing Gems Jade Edition, pages 359–371. Morgan Kaufmann, 2012. doi:10.1016/B978-0-12-385963-1.00026-5.
8 Timo Beller, Maike Zwerger, Simon Gog, and Enno Ohlebusch. Space-efficient construction of the burrows-wheeler transform. In SPIRE, volume 8214 of Lecture Notes in Computer Science, pages 5–16. Springer, 2013. doi:10.1007/978-3-319-02432-5_5.
9 Nico Bertram, Jonas Ellert, and Johannes Fischer. Lyndon words accelerate suffix sorting. In ESA, volume 204 of LIPIcs, pages 15:1–15:13. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.ESA.2021.15.
10 Dominik Bez, Florian Kurpicz, Hans-Peter Lehmann, and Peter Sanders. High performance construction of RecSplit based minimal perfect hash functions. In ESA, volume 274 of LIPIcs, pages 19:1–19:16. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.ESA.2023.19.
11 Timo Bingmann, Patrick Dinklage, Johannes Fischer, Florian Kurpicz, Enno Ohlebusch, and Peter Sanders. Scalable text index construction. In Algorithms for Big Data, volume 13201 of Lecture Notes in Computer Science, pages 252–284. Springer, 2022. doi:10.1007/978-3-031-21534-6_14.
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
12 Timo Bingmann, Johannes Fischer, and Vitaly Osipov. Inducing suffix and lcp arrays in external memory. In ALENEX, pages 88–102. SIAM, 2013. doi:10.1137/1.9781611972931.8.
13 Timo Bingmann, Simon Gog, and Florian Kurpicz. Scalable construction of text indexes with thrill. In IEEE BigData, pages 634–643. IEEE, 2018. doi:10.1109/BigData.2018.8622171.
14 Paola Bonizzoni, Gianluca Della Vedova, Yuri Pirola, Marco Previtali, and Raffaella Rizzi. Computing the multi-string BWT and LCP array in external memory. Theor. Comput. Sci., 862:42–58, 2021. doi:10.1016/j.tcs.2020.11.041.
15 Silvia Bonomo, Sabrina Mantaci, Antonio Restivo, Giovanna Rosone, and Marinella Sciortino. Sorting conjugates and suffixes of words in a multiset. Int. J. Found. Comput. Sci., 25(8):1161–, 2014. doi:10.1142/S0129054114400309.
16 Christina Boucher, Travis Gagie, Alan Kuhnle, Ben Langmead, Giovanni Manzini, and Taher Mun. Prefix-free parsing for building big BWTs. Algorithms Mol. Biol., 14(1):13:1–13:15, 2019. doi:10.1186/s13015-019-0148-5.
17 Florian Büren, Daniel Jünger, Robin Kobus, Christian Hundt, and Bertil Schmidt. Suffix array construction on multi-GPU systems. In HPDC, pages 183–194. ACM, 2019. doi:10.1145/3307681.3325961.
18 Michael Burrows and David J. Wheeler. A block-sorting lossless data compression algorithm. Technical report, 1994.
19 Anthony J. Cox, Fabio Garofalo, Giovanna Rosone, and Marinella Sciortino. Lightweight LCP construction for very large collections of strings. J. Discrete Algorithms, 37:17–33, 2016. doi:10.1016/j.jda.2016.03.003.
20 Andreas Crauser and Paolo Ferragina. A theoretical and experimental study on the construction of suffix arrays in external memory. Algorithmica, 32(1):1–35, 2002. doi:10.1007/s00453-001-0051-5.
21 Maxime Crochemore, Roberto Grossi, Juha Kärkkäinen, and Gad M. Landau. Computing the burrows-wheeler transform in place and in small space. J. Discrete Algorithms, 32:44–52, 2015. doi:10.1016/j.jda.2015.01.004.
22 Roman Dementiev, Juha Kärkkäinen, Jens Mehnert, and Peter Sanders. Better external memory suffix array construction. ACM J. Exp. Algorithms, 12:3.4:1–3.4:24, 2008. doi:10.1145/1227161.1402296.
23 Mrinal Deo and Sean Keely. Parallel suffix array and least common prefix for the GPU. In PPoPP, pages 197–206. ACM, 2013. doi:10.1145/2442516.2442536.
24 Aditya Deshpande and P. J. Narayanan. Fast burrows wheeler compression using all-cores. In IPDPS Workshops, pages 628–636. IEEE Computer Society, 2015. doi:10.1109/IPDPSW.2015.53.
25 Diego Díaz-Domínguez and Gonzalo Navarro. Efficient construction of the BWT for repetitive text using string compression. Inf. Comput., 294:105088, 2023. doi:10.1016/j.ic.2023.105088.
26 James Alexander Edwards and Uzi Vishkin. Parallel algorithms for burrows-wheeler compression and decompression. Theor. Comput. Sci., 525:10–22, 2014. doi:10.1016/j.tcs.2013.10.009.
27 Lavinia Egidi, Felipe A. Louza, Giovanni Manzini, and Guilherme P. Telles. External memory BWT and LCP computation for sequence collections with applications. Algorithms Mol. Biol., 14(1):6:1–6:15, 2019. doi:10.1186/s13015-019-0140-0.
28 Lavinia Egidi and Giovanni Manzini. Lightweight merging of compressed indices based on BWT variants. Theor. Comput. Sci., 812:214–229, 2020. doi:10.1016/j.tcs.2019.11.001.
29 Paolo Ferragina, Travis Gagie, and Giovanni Manzini. Lightweight data indexing and compression in external memory. Algorithmica, 63(3):707–730, 2012. doi:10.1007/s00453-011-9535-0.
30 Paolo Ferragina and Giovanni Manzini. Opportunistic data structures with applications. In FOCS, pages 390–398. IEEE Computer Society, 2000. doi:10.1109/SFCS.2000.892127.
31 Paolo Ferragina and Gonzalo Navarro. Pizza&chili corpus. http://pizzachili.dcc.uchile.c1/, 2005.
32 Eddie Ferro, Tyler Pencinger, Oded Green, Mahsa Lotfollahi, and Christina Boucher. Rapid-PFP: Accelerating prefix-free parsing with GPU parallelism. bioRxiv preprint, 2026. doi:10.64898/2026.04.28.721411.
33 Johannes Fischer and Florian Kurpicz. Dismantling DivSufSort. In PSC, pages 62–76. Department of Theoretical Computer Science, Faculty of Information Technology, Czech Technical University in Prague, 2017.
34 Johannes Fischer and Florian Kurpicz. Lightweight distributed suffix array construction. In ALENEX, pages 27–38. SIAM, 2019. doi:10.1137/1.9781611975499.3.
35 Patrick Flick and Srinivas Aluru. Parallel distributed memory construction of suffix and longest common prefix arrays. In SC, pages 16:1–16:10. ACM, 2015. doi:10.1145/2807591.2807609.
36 Marco Franzreb, Martin Burtscher, and Stephan Rudolph. GPU implementation of the wavelet tree. CoRR, abs/2505.03372, 2025. doi:10.48550/arXiv.2505.03372.
37 José Fuentes-Sepúlveda, Gonzalo Navarro, and Yakov Nekrich. Space-efficient computation of the burrows-wheeler transform. In DCC, pages 132–141. IEEE, 2019. doi:10.1109/DCC.2019.00021.
38 José Fuentes-Sepúlveda, Gonzalo Navarro, and Yakov Nekrich. Parallel computation of the burrows wheeler transform in compact space. Theor. Comput. Sci., 812:123–136, 2020. doi:10.1016/j.tcs.2019.09.030.
39 Travis Gagie, Gonzalo Navarro, and Nicola Prezza. Fully functional suffix trees and optimal text searching in BWT-runs bounded space. J. ACM, 67(1):2:1–2:54, 2020. doi:10.1145/3375890.
40 Ylenia Galluzzo, Raffaele Giancarlo, Mario Randazzo, and Simona E. Rombo. Burrows wheeler transform on a large scale: Algorithms implemented in apache spark. Data, 11(3), 2026. doi:10.3390/data11030048.
41 Ilya Grebnov. libsais: suffix array and BWT construction based on induced sorting. https://github.com/IlyaGrebnov/libsais, 2021. Version 2.10.4.
42 Ilya Grebnov. libcubwt: GPU-accelerated suffix array and BWT construction. https://github.com/IlyaGrebnov/libcubwt, 2023. Version 1.6.3.
43 Manuel Haag, Florian Kurpicz, Peter Sanders, and Matthias Schimek. Fast and lightweight distributed suffix array construction. In ESA, volume 351 of LIPIcs, pages 47:1–47:18. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ESA.2025.47.
44 Shinya Hayashi and Kenjiro Taura. Parallel and memory-efficient burrows-wheeler transform. In IEEE BigData, pages 43–50. IEEE Computer Society, 2013. doi:10.1109/BigData.2013.6691757.
45 James Holt and Leonard McMillan. Merging of multi-string BWTs with applications. Bioinform., 30(24):3524–3531, 2014. doi:10.1093/bioinformatics/btu584.
46 Wing-Kai Hon, Tak Wah Lam, Kunihiko Sadakane, Wing-Kin Sung, and Siu-Ming Yiu. A space and time efficient algorithm for constructing compressed suffix arrays. Algorithmica, 48(1):23–36, 2007. doi:10.1007/s00453-006-1228-8.
47 Wing-Kai Hon, Kunihiko Sadakane, and Wing-Kin Sung. Breaking a time-and-space barrier in constructing full-text indices. SIAM J. Comput., 38(6):2162–2178, 2009. doi:10.1137/070685373.
48 Juha Kärkkäinen. Fast BWT in small space by blockwise suffix sorting. Theor. Comput. Sci., 387(3):249–257, 2007. doi:10.1016/j.tcs.2007.07.018.
49 Juha Kärkkäinen, Dominik Kempa, and Simon J. Puglisi. Parallel external memory suffix sorting. In CPM, volume 9133 of Lecture Notes in Computer Science, pages 329–342. Springer, 2015. doi:10.1007/978-3-319-19929-0_28.
50 Juha Kärkkäinen, Dominik Kempa, Simon J. Puglisi, and Bella Zhukova. Engineering external memory induced suffix sorting. In ALENEX, pages 98–108. SIAM, 2017. doi:10.1137/1.9781611974768.8.
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
51 Juha Kärkkäinen, Peter Sanders, and Stefan Burkhardt. Linear work suffix array construction. J. ACM, 53(6):918–936, 2006. doi:10.1145/1217856.1217858.
52 Richard M. Karp and Michael O. Rabin. Efficient randomized pattern-matching algorithms. IBM J. Res. Dev., 31(2):249–260, 1987. doi:10.1147/rd.312.0249.
53 Dominik Kempa. Optimal construction of compressed indexes for highly repetitive texts. In SODA, pages 1344–1357. SIAM, 2019. doi:10.1137/1.9781611975482.82.
54 Dominik Kempa and Tomasz Kociumaka. String synchronizing sets: sublinear-time BWT construction and optimal LCE data structure. In STOC, pages 756–767. ACM, 2019. doi:10.1145/3313276.3316368.
55 Dominik Kempa and Tomasz Kociumaka. Resolution of the burrows-wheeler transform conjecture. In FOCS, pages 1002–1013. IEEE, 2020. doi:10.1109/FOCS46700.2020.00097.
56 Jamshed Khan, Tobias Rubel, Erin K. Molloy, Laxman Dhulipala, and Rob Patro. Fast, parallel, and cache-friendly suffix array construction. Algorithms Mol. Biol., 19(1):16, 2024. doi:10.1186/s13015-024-00263-5.
57 Dong Kyue Kim, Jeong Seop Sim, Heejin Park, and Kunsoo Park. Constructing suffix arrays in linear time. J. Discrete Algorithms, 3(2-4):126–142, 2005. doi:10.1016/j.jda.2004.08.019.
58 Joao Paulo Kitajima and Gonzalo Navarro. A fast distributed suffix array generation algorithm. In SPIRE/CRIWG, pages 97–105. IEEE Computer Society, 1999. doi:10.1109/SPIRE.1999.796583.
59 Pang Ko and Srinivas Aluru. Space efficient linear time construction of suffix arrays. J. Discrete Algorithms, 3(2-4):143–156, 2005. doi:10.1016/j.jda.2004.08.002.
60 Dominik Köppl, Daiki Hashimoto, Diptarama Hendrian, and Ayumi Shinohara. In-place bijective burrows-wheeler transforms. In CPM, volume 161 of LIPIcs, pages 21:1–21:15. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.CPM.2020.21.
61 Alan Kuhnle, Taher Mun, Christina Boucher, Travis Gagie, Ben Langmead, and Giovanni Manzini. Efficient construction of a complete index for pan-genomics read alignment. J. Comput. Biol., 27(4):500–513, 2020. doi:10.1089/cmb.2019.0309.
62 Fabian Kulla and Peter Sanders. Scalable parallel suffix array construction. Parallel Comput., 33(9):605–612, 2007. doi:10.1016/j.parco.2007.06.004.
63 Julian Labeit, Julian Shun, and Guy E. Blelloch. Parallel lightweight wavelet tree, suffix array and FM-index construction. J. Discrete Algorithms, 43:2–17, 2017. doi:10.1016/j.jda.2017.04.001.
64 Ben Langmead, Cole Trapnell, Mihai Pop, and Steven L. Salzberg. Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome Biology, 10(3):R25, 2009. doi:10.1186/gb-2009-10-3-r25.
65 Bin Lao, Ge Nong, Wai Hong Chan, and Jing Yi Xie. Fast in-place suffix sorting on a multicore computer. IEEE Trans. Computers, 67(12):1737–1749, 2018. doi:10.1109/TC.2018.2842050.
66 N. Jesper Larsson and Kunihiko Sadakane. Faster suffix sorting. Theor. Comput. Sci., 387(3):258–272, 2007. doi:10.1016/j.tcs.2007.07.017.
67 Heng Li. BWT construction and search at the terabase scale. Bioinform., 40(12), 2024. doi:10.1093/bioinformatics/btae717.
68 Heng Li and Richard Durbin. Fast and accurate short read alignment with burrows-wheeler transform. Bioinform., 25(14):1754–1760, 2009. doi:10.1093/bioinformatics/btp324.
69 Ruiqiang Li, Chang Yu, Yingrui Li, Tak Wah Lam, Siu-Ming Yiu, Karsten Kristiansen, and Jun Wang. SOAP2: an improved ultrafast tool for short read alignment. Bioinform., 25(15):1966–1967, 2009. doi:10.1093/bioinformatics/btp336.
70 Zhize Li, Jian Li, and Hongwei Huo. Optimal in-place suffix sorting. Inf. Comput., 285(Part):104818, 2022. doi:10.1016/j.ic.2021.104818.
71 Gang Liao, Longfei Ma, Guangming Zang, and Lin Tang. Parallel DC3 algorithm for suffix array construction on many-core accelerators. In CCGRID, pages 1155–1158. IEEE Computer Society, 2015. doi:10.1109/CCGrid.2015.56.
72 Bo Liu, Dixian Zhu, and Yadong Wang. deBWT: parallel construction of burrows-wheeler transform for large collection of genomes with de bruijn-branch encoding. Bioinform., 32(12):174–182, 2016. doi:10.1093/bioinformatics/btw266.
73 Chi-Man Liu, Ruibang Luo, and Tak Wah Lam. GPU-accelerated BWT construction for large collection of short reads. CoRR, abs/1401.7457, 2014. doi:10.48550/arXiv.1401.7457.
74 Yongchao Liu, Thomas Hankeln, and Bertil Schmidt. Parallel and space-efficient construction of burrows-wheeler transform and suffix array for big genome data. IEEE ACM Trans. Comput. Biol. Bioinform., 13(3):592–598, 2016. doi:10.1109/TCBB.2015.2430314.
75 Udi Manber and Eugene W. Myers. Suffix arrays: A new method for on-line string searches. SIAM J. Comput., 22(5):935–948, 1993. doi:10.1137/0222058.
76 Sabrina Mantaci, Antonio Restivo, Giovanna Rosone, and Marinella Sciortino. Suffix array and lyndon factorization of a text. J. Discrete Algorithms, 28:2–8, 2014. doi:10.1016/j.jda.2014.06.001.
77 Giovanni Manzini. An analysis of the burrows-wheeler transform. J. ACM, 48(3):407–430, 2001. doi:10.1145/382780.382782.
78 Giovanni Manzini and Paolo Ferragina. Engineering a lightweight suffix array construction algorithm. Algorithmica, 40(1):33–50, 2004. doi:10.1007/s00453-004-1094-1.
79 Francesco Masillo. Matching statistics speed up BWT construction. In ESA, volume 274 of LIPIcs, pages 83:1–83:15. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.ESA.2023.83.
80 Rohith K. Menon, Goutham P. Bhat, and Michael C. Schatz. Rapid parallel genome indexing with MapReduce. In 2nd International Workshop on MapReduce and its Applications (MapReduce), pages 51–58, 2011. doi:10.1145/1996092.1996104.
81 Duane Merrill. CUB: Cooperative primitives for CUDA C++. Part of the CUDA Core Compute Libraries, https://github.com/NVIDIA/cccl. Version TODO.
82 Yuta Mori. libdivsufsort: A lightweight suffix-sorting library. https://github.com/y-256/libdivsufsort, 2010. Version 2.0.1.
83 J. Ian Munro, Gonzalo Navarro, and Yakov Nekrich. Space-efficient construction of compressed indexes in deterministic linear time. In SODA, pages 408–424. SIAM, 2017. doi:10.1137/1.9781611974782.26.
84 Takaaki Nishimoto, Shunsuke Kanda, and Yasuo Tabei. An optimal-time RLBWT construction in BWT-runs bounded space. In ICALP, volume 229 of LIPIcs, pages 99:1–99:20. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ICALP.2022.99.
85 Takaaki Nishimoto and Yasuo Tabei. Optimal-time queries on BWT-runs compressed indexes. In ICALP, volume 198 of LIPIcs, pages 101:1–101:15. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.ICALP.2021.101.
86 Ge Nong. Practical linear-time o(1)-workspace suffix sorting for constant alphabets. ACM Trans. Inf. Syst., 31(3):15, 2013. doi:10.1145/2493175.2493180.
87 Ge Nong, Wai Hong Chan, Sheng Qing Hu, and Yi Wu. Induced sorting suffixes in external memory. ACM Trans. Inf. Syst., 33(3):12:1–12:15, 2015. doi:10.1145/2699665.
88 Ge Nong, Sen Zhang, and Wai Hong Chan. Two efficient algorithms for linear time suffix array construction. IEEE Trans. Computers, 60(10):1471–1484, 2011. doi:10.1109/TC.2010.188.
89 Tatsuya Ohno, Kensuke Sakai, Yoshimasa Takabatake, Tomohiro I, and Hiroshi Sakamoto. A faster implementation of online RLBWT and its application to LZ77 parsing. J. Discrete Algorithms, 52-53:18–28, 2018. doi:10.1016/j.jda.2018.11.002.
90 Daisuke Okanohara and Kunihiko Sadakane. A linear-time burrows-wheeler transform using induced sorting. In SPIRE, volume 5721 of Lecture Notes in Computer Science, pages 90–101. Springer, 2009. doi:10.1007/978-3-642-03784-9_9.
91 Jannik Olbrich. Fast and memory-efficient BWT construction of repetitive texts using lyndon grammars. In ESA, volume 351 of LIPIcs, pages 60:1–60:19. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ESA.2025.60.
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
92 Jannik Olbrich, Enno Ohlebusch, and Thomas Büchler. Generic non-recursive suffix array construction. ACM Trans. Algorithms, 20(2):18, 2024. doi:10.1145/3641854.
93 Marco Oliva, Travis Gagie, and Christina Boucher. Recursive prefix-free parsing for building big BWTs. In DCC, pages 62–70. IEEE, 2023. doi:10.1109/DCC55655.2023.00014.
94 Vitaly Osipov. Parallel suffix array construction for shared memory architectures. In SPIRE, volume 7608 of Lecture Notes in Computer Science, pages 379–384. Springer, 2012. doi:10.1007/978-3-642-34109-0_40.
95 Matthew Felice Pace and Alexander Tiskin. Parallel suffix array construction by accelerated sampling. In PSC, pages 142–156. Department of Theoretical Computer Science, Faculty of Information Technology, Czech Technical University in Prague, 2013.
96 Maximilian Paris. Parallele Konstruktion der burrows-wheeler-transformation auf der gpu. Master's thesis, University of Münster, Münster, 2026.
97 Ritesh A. Patel, Yao Zhang, Jason Mak, Andrew Davidson, and John D. Owens. Parallel lossless data compression on the GPU. In Innovative Parallel Computing (InPar), pages 1–9, 2012. doi:10.1109/InPar.2012.6339599.
98 Kartheek Diwakar Pingali, K. Chaitanya Pavan Tanay, and Pallav Kumar Baruah. GPU accelerated suffix array construction for large genome sequences. In International Conference on Innovations in Information, Embedded and Communication Systems (ICIIECS), pages 1–6, 2017. doi:10.1109/ICIIECS.2017.8276035.
99 Max Piochowiak, Florian Kurpicz, and Carsten Dachsbacher. Random access segmentation volume compression for interactive volume rendering. Comput. Graph. Forum, 44(3), 2025. doi:10.1111/cgf.70116.
100 Alberto Policriti and Nicola Prezza. LZ77 computation based on the run-length encoded BWT. Algorithmica, 80(7):1986–2011, 2018. doi:10.1007/s00453-017-0327-z.
101 Simon J. Puglisi, William F. Smyth, and Andrew Turpin. A taxonomy of suffix array construction algorithms. ACM Comput. Surv., 39(2):4, 2007. doi:10.1145/1242471.1242472.
102 Massimiliano Rossi, Marco Oliva, Ben Langmead, Travis Gagie, and Christina Boucher. MONI: A pangenomic index for finding maximal exact matches. J. Comput. Biol., 29(2):169–187, 2022. doi:10.1089/cmb.2021.0290.
103 Julian Shun, Guy E. Blelloch, Jeremy T. Fineman, Phillip B. Gibbons, Aapo Kyrola, Harsha Vardhan Simhadri, and Kanat Tangwongsan. Brief announcement: the problem based benchmark suite. In SPAA, pages 68–70. ACM, 2012. doi:10.1145/2312005.2312018.
104 Jouni Sirén. Burrows-wheeler transform for terabases. In DCC, pages 211–220. IEEE, 2016. doi:10.1109/DCC.2016.17.
105 Weidong Sun. Using GPU to accelerate suffix array construction. In BMEI, pages 677–682. IEEE, 2014. doi:10.1109/BMEI.2014.7002859.
106 Weidong Sun and Zongmin Ma. Parallel lexicographic names construction with CUDA. In ICPADS, pages 913–918. IEEE Computer Society, 2009. doi:10.1109/ICPADS.2009.31.
107 German Tischler. Faster average case low memory semi-external construction of the burrows-wheeler transform. Math. Comput. Sci., 11(2):159–176, 2017. doi:10.1007/s11786-017-0296-2.
108 Leyuan Wang, Sean Baxter, and John D. Owens. Fast parallel skew and prefix-doubling suffix array construction on the GPU. Concurr. Comput. Pract. Exp., 28(12):3466–3484, 2016. doi:10.1002/cpe.3867.
109 Jing Yi Xie, Ge Nong, Bin Lao, and Wentao Xu. Scalable suffix sorting on a multicore machine. IEEE Trans. Computers, 69(9):1364–1375, 2020. doi:10.1109/TC.2020.2972546.
110 Mohsen Zakeri, Nathaniel K. Brown, Omar Y. Ahmed, Travis Gagie, and Ben Langmead. Movi: A fast and cache-efficient full-text pangenome index. iScience, 27(12):111464, 2024. doi:10.1016/j.isci.2024.111464.
111 Mohsen Zakeri, Nathaniel K. Brown, Travis Gagie, and Ben Langmead. Movi 2: fast and space-efficient queries on pangenomes. Bioinform., 42(7), 2026. doi:10.1093/bioinformatics/btag362.
112 Zhiheng Zhao, Jianping Yin, and Wei Xiong. GPU-accelerated burrow-wheeler transform for genomic data. In BMEI, pages 889–892. IEEE, 2012. doi:10.1109/BMEI.2012.6513199.
A More Related Work
This appendix covers BWT construction and suffix sorting in other models of computation.
BWT construction in other models. In the sequential setting, the BWT can be constructed directly from the text in compact space [46, 47], by blockwise suffix sorting in small space [48], by induced sorting in linear time [90], in linear time and bits [6, 83], in sublinear time for small alphabets [54], and even in place [21]. Lyndon-based approaches sort the suffixes of a text or a string collection via the Lyndon factorization [76, 15], construct the bijective and the extended BWT in linear time [4] or in place [60], and construct the BWT of repetitive texts from a grammar based on the standard factorization of Lyndon words [91]. For repetitive texts, the run-length BWT can be maintained online in space proportional to r [100, 89] and constructed in optimal time within the same space [84], in optimal time for highly repetitive texts [53], and from the LZ77 parse [55]. In practice, repetitive texts are handled by prefix-free parsing [16], which has been extended to the suffix array and the r-index [61] and applied recursively to the parse itself [93]. Other approaches use grammar compression [25], matching statistics [79], and the incremental construction of ropebwt3 [67], which indexes hundreds of human genomes. In external and semi-external memory, the BWT is constructed with sequential scans only [29], with little main memory [8, 107], by BCR [5, 19] and other algorithms for string collections [14, 1], and by merging the BWTs of subcollections [45, 104, 27, 28]. Shared-memory parallel constructions exist for single genomes [44, 74], for collections of genomes [72], and in compact space [37]. PRAM algorithms construct the BWT with polylogarithmic depth [26, 38]. In distributed memory, the BWT has been computed with MapReduce [80] and Apache Spark [40]. All PFP-based constructions we are aware of run on CPUs and rely on hash tables and inverted lists.
Suffix sorting in other models. Puglisi et al. [101] survey sequential SACAs. SACABench [2] compares many of them. The classical approaches are prefix doubling [75, 66], the recursive linear-time algorithms [51, 57, 59], and induced sorting [88, 86]. More recent algorithms are non-recursive and based on Lyndon words [3, 9, 92] or work in place in linear time [70]. Practical implementations include deep-shallow sorting [78], divsufsort [82, 33], and libsais [41], which is based on induced sorting and among the fastest. In external memory, suffix arrays are constructed by doubling [20, 22], by the skew algorithm [22], by induced sorting [12, 87, 50], and in parallel [49]. Shared-memory parallel SACAs parallelize the skew algorithm [103], prefix doubling and induced copying [63], induced sorting [65, 109], and samplesort [56]. In distributed memory, SACAs parallelize doubling [58, 35] and the skew algorithm [62, 13]. Recent lightweight constructions scale to many compute nodes [34, 43]. The skew algorithm also has PRAM and BSP variants [51]. Pace and Tiskin [95] give a deterministic BSP algorithm with few synchronization steps.
B Additional Experiments
The memory ladder. Figure 14 shows the time per phase (the eight phases of Figure 4 plus setup and output, which include the transfers between host and GPU) of all configurations at the largest input size that all of them handle, and Figure 11 shows the same runs as
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
space-time points. On the non-repetitive inputs, each level lowers the peak. On english at 381.5 MiB, the peak drops from 47.7 bytes per character at level 0 to 41.0 at level 2, 32.0 at level 3, 20.9 at level 4, and 13.4 and 11.9 at levels 5 and 6. The levels cost time: level 4 is the slowest on every non-repetitive input (on pitches, 19.1 s instead of 3.2 s at level 0), and levels 5 and 6 recover only part of the loss (9.1 s). The MSD core removes this cost. On english, cub6 has the same peak as opt6 (11.9 bytes per character) and needs 1.6 instead of 2.6 s. On pitches, it needs 1.2 instead of 9.1 s at 17.0 instead of 14.2 bytes per character. On six of the nine repetitive inputs, the peak does not change across the levels, because s is small (at most 0.10n) and the peak lies in the dictionary phases (parsing, the two dictionary sorts, and the parse ranks). There, cub6 needs more memory than opt6 because of the scratch of its unchunked dictionary sorts. space removes this scratch and lies on the Pareto front on 13 of the 15 inputs. The levels below 5 are dominated on 14 of them. On the whole english, space lowers the peaks of the LR dictionary sort (6.7 → 4.6 bytes per character) and of the suffix generation (7.8 → 5.8). The suffix sort then determines the overall peak, which drops only from 10.0 to 9.9. Where a dictionary sort determines the peak, space lowers it from 15.3 to 11.1 bytes per character on the whole proteins and by 24 to 27% on eight of the nine repetitive inputs.
C Comparison with Big-BWT
Table 3 maps each step of Big-BWT (Section 4.4) to the corresponding step of our algorithm (Section 5).


Figure 14 Time per phase at the largest input size that all configurations handle, for the non-repetitive (top) and the repetitive texts (bottom).
Engineering Lightweight BWT Construction on the GPU via Prefix-Free Parsing
Table 3 The steps of the original PFP-BWT (Big-BWT, Section 4.4) and of our GPU algorithm.
| step | original (Big-BWT) | ours |
|---|---|---|
| text and conventions | #`T | ^w`, the first window acts as a trigger string instead of #, BWT in the convention of libcubwt |
| triggers | rolling Karp–Rabin hash, sequential scan | the same fingerprint, evaluated directly per window, no dependency between windows |
| parsing | one pass emitting phrases | count triggers per block, scan, write phrase ends into |
| dictionary | hash table of phrase hashes with frequencies, sorted dictionary on disk | never materialized, groups of equal phrases in the LR order of |
| parse | phrase ranks on disk | group ranks of the LR order, written back in text order |
| order of the parse | SA() by SACA-K, inverted lists from SA(), permuted | SA() by prefix doubling, and per occurrence the rank of the following parse suffix |
| phrase suffixes | SA and LCP of the concatenated dictionary by gSACA-K | generated once each by adjacency in the RL order, then sorted as strings (Sections 6.1 and 6.2) |
| occurrence sets | phrases sharing a suffix found by the LCP scan, their occurrences found via the inverted lists | a contiguous interval of the RL order, found by a next-smaller-value query on the longest common suffixes |
| easy/hard test | compare the preceding characters of all phrases sharing the suffix | compare the preceding characters of the two interval endpoints |
| emission | easy suffixes as a run of the summed phrase frequencies, hard suffixes by a heap merge of inverted lists | easy suffixes as a run of the interval size, hard suffixes by sorting the interval by parse rank |
| whole phrases execution | preceding character from sequential, external memory, space about plus the total length of | preceding character read from GPU-resident, data-parallel, space governed by and |