Hello,
I've played around a little and replaced libdivsufsort's trsort with basically radixSA
(I actually use boost's spreadsort, std::sort and insertion sort instead of radix sort).
Memory requirements should stay the same.
Runtimes reported by suftest on my machine (i7 4770K, 16 GB RAM):
Code:
File | orginal | modified
enwik8 | 8.1600 s | 7.8960 s
enwik9 | 105.0930 s | 95.5340 s
This is without OpenMP. OpenMP speeds up the unmodified sssort so the changes are a bit more significant:
Code:
File | orginal | modified
enwik8 | 6.1880 s | 5.9630 s
enwik9 | 83.1580 s | 74.6800 s
Source code can be found at https://github.com/akamiru/libdivsufsort
Main changes are in lib/spsort.cpp.