-
Notifications
You must be signed in to change notification settings - Fork 289
Basic Benchmarks
Vladimir Schneider edited this page Jun 19, 2016
·
4 revisions
I realized that previous results had the code running commonmark-java and flexmark-java parsing and rendering, while intellij-markdown and pegdown were only running parsing. Also, commonmark-java was only running with ext-gfm-tables but 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.
File | commonmark-java | flexmark-java | flexmark-java-all | intellij-markdown | pegdown |
---|---|---|---|---|---|
README-SLOW | 0.464ms | 0.767ms | 0.795ms | 1.616ms | 14.467ms |
VERSION | 0.785ms | 1.013ms | 1.157ms | 3.537ms | 41.189ms |
commonMarkSpec | 31.755ms | 50.024ms | 52.125ms | 584.271ms | 559.061ms |
markdown_example | 8.927ms | 9.509ms | 10.026ms | 206.310ms | 928.091ms |
spec | 4.911ms | 6.149ms | 6.631ms | 33.870ms | 286.549ms |
table | 0.228ms | 0.564ms | 0.595ms | 0.653ms | 3.269ms |
table-format | 1.245ms | 1.934ms | 2.673ms | 3.602ms | 22.231ms |
wrap | 3.298ms | 6.951ms | 7.403ms | 14.687ms | 80.052ms |
Ratios of above:
File | commonmark-java | flexmark-java | flexmark-java-all | intellij-markdown | pegdown |
---|---|---|---|---|---|
README-SLOW | 1.00 | 1.65 | 1.71 | 3.48 | 31.20 |
VERSION | 1.00 | 1.29 | 1.47 | 4.50 | 52.46 |
commonMarkSpec | 1.00 | 1.58 | 1.64 | 18.40 | 17.61 |
markdown_example | 1.00 | 1.07 | 1.12 | 23.11 | 103.96 |
spec | 1.00 | 1.25 | 1.35 | 6.90 | 58.35 |
table | 1.00 | 2.47 | 2.61 | 2.86 | 14.35 |
table-format | 1.00 | 1.55 | 2.15 | 2.89 | 17.86 |
wrap | 1.00 | 2.11 | 2.24 | 4.45 | 24.27 |
----------- | --------- | --------- | --------- | --------- | --------- |
overall | 1.00 | 1.49 | 1.58 | 16.44 | 37.49 |
File | commonmark-java | flexmark-java | flexmark-java-all | intellij-markdown | pegdown |
---|---|---|---|---|---|
README-SLOW | 0.60 | 1.00 | 1.04 | 2.11 | 18.86 |
VERSION | 0.77 | 1.00 | 1.14 | 3.49 | 40.65 |
commonMarkSpec | 0.63 | 1.00 | 1.04 | 11.68 | 11.18 |
markdown_example | 0.94 | 1.00 | 1.05 | 21.70 | 97.61 |
spec | 0.80 | 1.00 | 1.08 | 5.51 | 46.60 |
table | 0.40 | 1.00 | 1.06 | 1.16 | 5.80 |
table-format | 0.64 | 1.00 | 1.38 | 1.86 | 11.49 |
wrap | 0.47 | 1.00 | 1.06 | 2.11 | 11.52 |
----------- | --------- | --------- | --------- | --------- | --------- |
overall | 0.67 | 1.00 | 1.06 | 11.03 | 25.16 |
- 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