Commit 49685aa
committed
Remove regular expression re-compiles
- The only thing that changes about the regular expression is the prefix
- We can also detect the prefix with startswith, and then use the same
regular expression across the loop
- This means that Python can cache the compiled regex internally, and we
save some time1 parent 3fa52a9 commit 49685aa
1 file changed
+9
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
1103 | | - | |
| 1103 | + | |
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
1107 | | - | |
| 1107 | + | |
| 1108 | + | |
1108 | 1109 | | |
1109 | 1110 | | |
1110 | 1111 | | |
| |||
1113 | 1114 | | |
1114 | 1115 | | |
1115 | 1116 | | |
1116 | | - | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1120 | 1123 | | |
1121 | 1124 | | |
1122 | 1125 | | |
| |||
0 commit comments