Giter Site home page Giter Site logo

Comments (2)

hucsmn avatar hucsmn commented on August 22, 2024 1

The motivation of this crate is to quickly sort suffix array of binary data in memory and use as less memory as possible. However, burntsushi's suffix is for indexing utf-8 encoded text. Since utf-8 is a variable width encoding, performances of these two crates were not that comparable.

I was woking on implementing a better bsdiff months before, which quite need a mordern suffix array construction algorithm. Util I started this work, there was no such rust crate that could meet my requisitions (for now, there is divsufsort ported by Amos Wenger, which is more recommended).
Therefore, I implemented a partially paralleled SACA, which uses O(1) additional memory and runs in O(n) time (qsufsort in Colin Percival's original bsdiff 4.3 is O(n) additional memory & O(n*log(n)) worst time).

AFAIK, speed of this crate is usually 1.3x-1.7x faster than burntsushi's suffix, but 2x-3x slower than Yuta Mori's dissufsort in C and Amos Wenger's hand-ported divsufsort in rust. The testing code and result was listed here. For people who launches new projects relating to binary data indexing, the new rust-bindings for divsufsort by Amos Wenger is preferred.

I am planned to try another implementation of SACA, or just simply replace the current implementation with Amos Wenger's work in later versions. I would like to add some explainations to README.

TL;DR: suffix_array runs faster than burntsushi's suffix. But it is not suitable to compare them in this way, because suffix handles utf-8 input while suffix_array does not. For people who need indexing utf-8 encoded texts, it is recommend to use burntsushi's suffix.

from suffix_array.

Shnatsel avatar Shnatsel commented on August 22, 2024

Thanks! It would be great to put the TL;DR in the README.

from suffix_array.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.