Commit 87467ee
committed
PrettyPrinterPerformance PrettyPrinterPerformance PrettyPrinterPerformance PrettyPrinterPerformance Optimized the PrettyPrinter for #894
Worked to get the perfomance to be closer to where we were before the changes in #883. This code should be only about 1.5% slower rather than 7% slower.
Using a lazy filter as `count(where:_)` isn't avaliable < Swift 6.0.
One forward loop and using the UTF8 view makes this faster than the original code pre-#883.1 parent a871b81 commit 87467ee
1 file changed
+10
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
134 | 134 | | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| |||
0 commit comments