Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
some benchmarks to test the changes made to remove_punctuation
  • Loading branch information
medecau committed Nov 3, 2011
1 parent 7b6590c commit 5a45712
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions fuzzywuzzy/benchmarks.py
@@ -0,0 +1,19 @@
from timeit import timeit
import utils

iterations=100000

cirque_strings = [
"cirque du soleil - zarkana - las vegas",
"cirque du soleil ",
"cirque du soleil las vegas",
"zarkana las vegas",
"las vegas cirque du soleil at the bellagio",
"zarakana - cirque du soleil - bellagio"
]


for s in cirque_strings:
print 'Test for string: "%s"' % s
print 'Old: %f' % round(timeit('utils.remove_punctuationold(\'%s\')' % s, "import utils",number=iterations),4)
print 'New: %f' % round(timeit('utils.remove_punctuation(\'%s\')' % s, "import utils",number=iterations),4)

0 comments on commit 5a45712

Please sign in to comment.