Sapling/Docs/Benchmarks/README.md

46 lines
1.1 KiB
Markdown

# Editor Benchmark Assets
These files are official editor performance benchmark inputs.
## 5mb.md
Source: user-provided Milestone 2.6 benchmark document.
Measured on May 30, 2026:
| Property | Value |
| --- | ---: |
| File size | 5,526,168 bytes |
| Characters | 5,474,683 |
| UTF-16 units | 5,526,164 |
| Physical lines | 51,482 |
| CR characters | 51,481 |
| LF characters | 51,481 |
| Max line UTF-16 length | 659 |
| Average line UTF-16 length | 106.342 |
Markdown structure:
| Construct | Count |
| --- | ---: |
| ATX headings | 2 |
| Unordered list items | 2 |
| Ordered list items | 0 |
| Blockquotes | 0 |
| Fenced code fences | 0 |
| Lines with inline code | 0 |
| Lines with bold markers | 0 |
| Lines with italic markers | 0 |
| Inline links | 0 |
| Reference-style link markers | 51,156 |
| Images | 0 |
Important characteristic:
The file uses CRLF line endings. Swift treats `"\r\n"` as a single newline grapheme cluster, so code that searches a `String` for `Character("\n")` does not split this file into logical editor lines.
Reproduce:
```sh
swift run -c release SaplingEditorBenchmark Docs/Benchmarks/5mb.md
```