26

I finally finished my implementation of a suffix array construction algorithm! 😄
It takes about 30 mins to process 1GB of text and uses all available RAM, but it works! 🎉
Now I can optimize it, the original algorithm is 3x faster.

Comments
  • 6
    Suffix array construction? What's the purpose?
  • 2
  • 2
    @Jifuna I was thinking the same thing O.o
  • 5
    30 minutes of 100% ram use for a single gigabyte of data to process? Sounds like python, Java, or JavaScript. :P
  • 6
    @Jifuna
    A suffix array is an array which contains all suffixes of a text in lexicographically order. For the word banana it would be:
    a, ana, anana, banana, na, nana

    It is used for processing and analysing data, e.g. DNA sequences.
  • 1
    @kenogo
    Yes 😁
  • 3
    @bahua
    No it is C++. Its just a quite complexe computation and there is a lot of room for improvements.
    I don‘t want to know how long it would take in Java 😂
  • 0
    Dont use buffers, just save the piece of data you created so far to a file.

    It will save your ram usage a lot.
  • 1
    Try out slices. No need to reallocate.
Add Comment