-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbench.sh
executable file
·27 lines (25 loc) · 1.58 KB
/
bench.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
echo -ne "py2.7 recursive_levenshtein\t\t"
python2.7 -m timeit -s "import pylev" "pylev.recursive_levenshtein('Levenshtein', 'Frankenstein')"
echo -ne "py2.7 wf_levenshtein\t\t\t"
python2.7 -m timeit -s "import pylev" "pylev.wf_levenshtein('Levenshtein', 'Frankenstein')"
echo -ne "py2.7 wfi_levenshtein\t\t\t"
python2.7 -m timeit -s "import pylev" "pylev.wfi_levenshtein('Levenshtein', 'Frankenstein')"
echo -ne "py2.7 damerau_levenshtein\t\t"
python2.7 -m timeit -s "import pylev" "pylev.damerau_levenshtein('Levenshtein', 'Frankenstein')"
echo -ne "py3.3 recursive_levenshtein\t\t"
python3.3 -m timeit -s "import pylev" "pylev.recursive_levenshtein('Levenshtein', 'Frankenstein')"
echo -ne "py3.3 wf_levenshtein\t\t\t"
python3.3 -m timeit -s "import pylev" "pylev.wf_levenshtein('Levenshtein', 'Frankenstein')"
echo -ne "py3.3 wfi_levenshtein\t\t\t"
python3.3 -m timeit -s "import pylev" "pylev.wfi_levenshtein('Levenshtein', 'Frankenstein')"
echo -ne "py3.3 damerau_levenshtein\t\t"
python3.3 -m timeit -s "import pylev" "pylev.damerau_levenshtein('Levenshtein', 'Frankenstein')"
echo -ne "pypy recursive_levenshtein\t\t"
pypy -m timeit -s "import pylev" "pylev.recursive_levenshtein('Levenshtein', 'Frankenstein')"
echo -ne "pypy wf_levenshtein\t\t\t"
pypy -m timeit -s "import pylev" "pylev.wf_levenshtein('Levenshtein', 'Frankenstein')"
echo -ne "pypy wfi_levenshtein\t\t\t"
pypy -m timeit -s "import pylev" "pylev.wfi_levenshtein('Levenshtein', 'Frankenstein')"
echo -ne "pypy damerau_levenshtein\t\t"
pypy -m timeit -s "import pylev" "pylev.damerau_levenshtein('Levenshtein', 'Frankenstein')"