Commit af9255a
perf: avoid ToCharArray allocations in HtmlParser
- Pop(count): use Array.init instead of [| 0..n-1 |] |> Array.map
- EmitToAttributeValue: iterate string directly instead of ToCharArray()
- Cons(char array): use StringBuilder.Append(char[]) instead of Array.iter
- Cons(string): use StringBuilder.Append(string) directly
- CDATA marker: pass string literal to Cons instead of ToCharArray()
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent e1dadaf commit af9255a
2 files changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
261 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
262 | 266 | | |
263 | 267 | | |
264 | 268 | | |
| |||
666 | 670 | | |
667 | 671 | | |
668 | 672 | | |
669 | | - | |
| 673 | + | |
670 | 674 | | |
671 | 675 | | |
672 | 676 | | |
| |||
0 commit comments