-
Notifications
You must be signed in to change notification settings - Fork 275
Basic Benchmarks
Vladimir Schneider edited this page Jan 28, 2017
·
4 revisions
To make it more fair to pegdown I added ext-gfm-strikethrough and disabled auto-link extension for all parsers that have the option since it causes significant parser slow-down for all parsers:
I also added a flexmark-java configured with all extensions, except for auto-links, for an idea of how extra extensions affect performance.
Latest, Jan 28, 2017 flexmark-java 0.13.1, intellij-markdown from EAP 2017, commonmark-java 0.8.0:
File | commonmark-java | flexmark-java | intellij-markdown | pegdown |
---|---|---|---|---|
README-SLOW | 0.420ms | 0.812ms | 2.027ms | 15.483ms |
VERSION | 0.743ms | 1.425ms | 4.057ms | 42.936ms |
commonMarkSpec | 31.025ms | 44.465ms | 600.654ms | 575.131ms |
markdown_example | 8.490ms | 10.502ms | 223.593ms | 983.640ms |
spec | 4.719ms | 6.249ms | 35.883ms | 307.176ms |
table | 0.229ms | 0.623ms | 0.800ms | 3.642ms |
table-format | 1.385ms | 2.881ms | 4.150ms | 23.592ms |
wrap | 3.804ms | 4.589ms | 16.609ms | 86.383ms |
Ratios of above:
File | commonmark-java | flexmark-java | intellij-markdown | pegdown |
---|---|---|---|---|
README-SLOW | 1.00 | 1.93 | 4.83 | 36.88 |
VERSION | 1.00 | 1.92 | 5.46 | 57.78 |
commonMarkSpec | 1.00 | 1.43 | 19.36 | 18.54 |
markdown_example | 1.00 | 1.24 | 26.34 | 115.86 |
spec | 1.00 | 1.32 | 7.60 | 65.09 |
table | 1.00 | 2.72 | 3.49 | 15.90 |
table-format | 1.00 | 2.08 | 3.00 | 17.03 |
wrap | 1.00 | 1.21 | 4.37 | 22.71 |
----------- | --------- | --------- | --------- | --------- |
overall | 1.00 | 1.41 | 17.47 | 40.11 |
File | commonmark-java | flexmark-java | intellij-markdown | pegdown |
---|---|---|---|---|
README-SLOW | 0.52 | 1.00 | 2.50 | 19.07 |
VERSION | 0.52 | 1.00 | 2.85 | 30.12 |
commonMarkSpec | 0.70 | 1.00 | 13.51 | 12.93 |
markdown_example | 0.81 | 1.00 | 21.29 | 93.66 |
spec | 0.76 | 1.00 | 5.74 | 49.15 |
table | 0.37 | 1.00 | 1.28 | 5.85 |
table-format | 0.48 | 1.00 | 1.44 | 8.19 |
wrap | 0.83 | 1.00 | 3.62 | 18.83 |
----------- | --------- | --------- | --------- | --------- |
overall | 0.71 | 1.00 | 12.41 | 28.48 |
- VERSION.md is the version log file I use for Markdown Navigator
- commonMarkSpec.md is a 33k line file used in intellij-markdown test suite for performance evaluation.
- spec.txt commonmark spec markdown file in the commonmark-java project
-
hang-pegdown.md is a file containing a single line of 17 characters
[[[[[[[[[[[[[[[[[
which causes pegdown to go into a hyper-exponential parse time. -
hang-pegdown2.md a file containing a single line of 18 characters
[[[[[[[[[[[[[[[[[[
which causes pegdown to go into a hyper-exponential parse time. - wrap.md is a file I was using to test wrap on typing performance only to discover that it has nothing to do with the wrap on typing code when 0.1 seconds is taken by pegdown to parse the file. In the plugin the parsing may happen more than once: syntax highlighter pass, psi tree building pass, external annotator.
- markdown_example.md a file with 10,000+ lines containing 500kB+ of text.
- table.md is a file with a fairly large table to test table parsing performance