suffix array faster implementation