Skip to content
trie benchmark for the "longest prefix match" problem
Python
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
README.md
benchmark.py
log-fitting-polynoms.py
longest_match.py
measure-max-memory.py
run.sh

README.md

trie-benchmark

trie benchmark for the "longest prefix match" problem.

To generate time performance data (install pytrie, trie, datrie, SuffixTree or remove them from comparison):

$ ./benchmark.py --prefix nosw3_

To plot the data (install numpy/matplotlib):

$ make-figures.py --plot-only --prefix nosw3_

see make-figures.py

Or to combine both with a auto-generated date-based prefix:

$ ./run.sh

See results Performance comparison suffixtree vs. pytrie vs. trie vs. datrie vs. startswith -functions.

License

The code for longest_match* functions in longest_match.py is taken from the SO question and its answers. The rest is also CC BY-SA 3.0

Something went wrong with that request. Please try again.