Skip to content

daroczig/levenshtein-benchmarks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Benchmarks

Take 10k random lines of text, each 20 characters long. Search for a random 10k character strings by Levenshtein distance. Print the best match for each string.

make python

python generate_random_text.py 10000 > search.txt
python generate_random_text.py 10000 > index.txt
cd py && time poetry run python main.py < ../search.txt > /dev/null

real	0m25.185s
user	0m24.961s
sys	0m0.155s

make julia

cd julia && time julia --project=. main.jl < ../search.txt > /dev/null

real	0m57.660s
user	0m57.373s
sys	0m0.183s

make rust

cd rust && cargo build --release && time ./target/release/rust < ../search.txt > /dev/null
    Finished release [optimized] target(s) in 0.02s

real	0m43.100s
user	0m42.734s
sys	0m0.158s

make duckdb

cd duckdb && time duckdb < main.sql > /dev/null

real	3m37.596s
user	7m21.367s
sys	0m12.357s

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 42.7%
  • Rust 22.5%
  • Julia 21.1%
  • Makefile 13.7%