diff --git a/README.rst b/README.rst index 9241f658..fe21525b 100644 --- a/README.rst +++ b/README.rst @@ -95,13 +95,13 @@ XML file. I'm running them multiple times, being careful to use the ``timeit`` m To see more details, please see the `performance script `_. +-----------------+---------------------------------------------------------------------------+------------+--------------+---------------+------------+ -|Test |Description |# total runs|``re`` time(s)|``re2`` time(s)|% total time +|Test |Description |# total runs|``re`` time(s)|``re2`` time(s)|% total time| +=================+===========================================================================+============+==============+===============+============+ -|Findall URI|Email|Find list of '([a-zA-Z][a-zA-Z0-9]*)://([^ /]+)(/[^ ]*)?|([^ @]+)@([^ @]+)'|2 |21.672 |0.318 |1.47% +|Findall URI|Email|Find list of '([a-zA-Z][a-zA-Z0-9]*)://([^ /]+)(/[^ ]*)?|([^ @]+)@([^ @]+)'|2 |21.672 |0.318 |1.47% | +-----------------+---------------------------------------------------------------------------+------------+--------------+---------------+------------+ -|Replace WikiLinks|This test replaces links of the form [[Obama|Barack_Obama]] to Obama. |100 |17.271 |3.399 |19.68% +|Replace WikiLinks|This test replaces links of the form [[Obama|Barack_Obama]] to Obama. |100 |17.271 |3.399 |19.68% | +-----------------+---------------------------------------------------------------------------+------------+--------------+---------------+------------+ -|Remove WikiLinks |This test splits the data by the tag. |100 |15.820 |1.479 |9.35% +|Remove WikiLinks |This test splits the data by the tag. |100 |15.820 |1.479 |9.35% | +-----------------+---------------------------------------------------------------------------+------------+--------------+---------------+------------+ Feel free to add more speed tests to the bottom of the script and send a pull request my way! diff --git a/tests/performance.py b/tests/performance.py index bbf8982d..73203c2c 100755 --- a/tests/performance.py +++ b/tests/performance.py @@ -80,7 +80,7 @@ def benchmarks_to_ReST(benchmarks): def print_divider(symbol='-'): print '+' + '+'.join(symbol*col_size for col_size in col_sizes) + '+' def print_row(row): - print '|' + '|'.join(item.ljust(col_sizes[i]) for i, item in enumerate(row)) + print '|' + '|'.join(item.ljust(col_sizes[i]) for i, item in enumerate(row)) + '|' print_divider() print_row(table[0])