GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — MarkdownWriter: append unescaped spans in bulk by tballison · Pull Request #456 · commonmark/commonmark-java Conversation
Contributor
During profiling after the release of Tika 4.0.0, we found we could improve write speed quite a bit in cases where there weren't a lot of characters that needed to be escaped. 🤖 JMH, whole CommonMark spec (
|
| Benchmark | before | after | |
|---|---|---|---|
renderMarkdownWholeSpec (to StringBuilder) |
836.5 ± 34.3 ops/s | 956.7 ± 11.3 ops/s | +14% |
renderMarkdownWholeSpecToWriter |
401.9 ± 2.5 ops/s | 837.2 ± 20.1 ops/s | 2.08x |
Target Appendable |
before | after | |
|---|---|---|---|
OutputStreamWriter |
107 ms | 14.5 ms | 7.4x |
StringWriter |
75 ms | 12.3 ms | 6.1x |
StringBuilder |
26 ms | 12.7 ms | 2.0x |
Target Appendable |
before | after | |
|---|---|---|---|
OutputStreamWriter |
54.9 ms | 25.8 ms | 2.1x |
StringWriter |
46.1 ms | 21.5 ms | 2.1x |
StringBuilder |
24.2 ms | 20.8 ms | 1.2x |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nice, LGTM, thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Released in 0.30.1: https://github.com/commonmark/commonmark-java/blob/main/CHANGELOG.md#0301---2026-10-11 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.