Giter VIP home page Giter VIP logo

ahocorasick's Introduction

ahocorasick

Aho-corasick library

New version of the ahocorasick library (used in nDPI project)

The 'src' directory contains the original implementation of the aho-corasick algorithm (from nDPI project).

The 'new' directory contains the new implementation. The API has barely changed. Almost all data structures have been changed.

  1. The new version is up to about 25% faster (with optimization levels -O0 and -O2) and up to 45% faster (with optimization levels -O3).

  2. No recursion is used (smaller stack size required).

  3. Uses less memory (by valgrind info)

    • bigram:
      • original 1796 allocs, 247864 bytes allocated
      • new 1232 allocs, 158880 bytes allocated
    • host_match:
      • original 18038 allocs, 3004576 bytes allocated
      • new 6861 allocs, 396624 bytes allocated
  4. The function ac_automata_search() is thread safe.

  5. Optional case-insensitive comparison.

  6. Matching at the beginning and at the end of the string is supported.

  7. One code file and one header file.

ahocorasick's People

Contributors

vel21ripn avatar

Watchers

 avatar  avatar

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.