code-maven.com icon indicating copy to clipboard operation
code-maven.com copied to clipboard

compare-the-speed-of-grep-with-python-regex.txt: Clean up and expand

Open mfwitten opened this issue 2 years ago • 0 comments

This patch series does the following:

  • Fixes typos and grammar.

  • Makes comparisons more consistent.

  • Constructs optimized Python code in steps.

However:

  • I have not tested the rendering of the altered page; I only edited the source file.

The git history has already been designed to clearly delineate this patch:

$ git log --oneline --graph 71596046^..
*   e5d6ef96 compare-the-speed-of-grep-with-python-regex.txt: Clean up and expand
|\  
| * 6128a670 Update the grep version to what I'm using
| * 89b487b5 Update the examples of a regular expression that is more complex
| * 9020ef82 Add output from test command
| * 7fdc142b grep_speed*.py: Match the bash code better at first
| * 69e72c73 typo/grammar
| * 6400c709 grammar
| * 514dcc77 better punctuation: s/,/;/
| * ebdfe43b typo/grammar
| * 3ae3b21e typo/grammar
| * 28ddbcf9 typo/grammar
| * 5b3a0bb1 Move the command lines that create and verify the test input
| * 18e2b1fc typo/grammar
|/  
* 71596046 update

You may want to update the Perl version of this page, which is what prompted this work in the first place; if I recall correctly, perl tries to compile regular expressions only once when possible, and so you may be comparing apples and oranges there.

In addition, this is a one-off PR; I will not be making any improvements to my patch series, so if you want to use my work, please apply this series and then add your changes on top as you see fit.

mfwitten avatar Sep 19 '21 22:09 mfwitten