Skip to content

Commit

Permalink
Update benchmarks. Closes #338.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Jun 15, 2021
1 parent 3253e19 commit 6f14040
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ progit:
$(BENCHFILE): progit
echo "" > $@
for lang in ar az be ca cs de en eo es es-ni fa fi fr hi hu id it ja ko mk nl no-nb pl pt-br ro ru sr th tr uk vi zh zh-tw; do \
for i in `seq 1 10`; do \
cat progit/$$lang/*/*.markdown >> $@; \
done; \
cat progit/$$lang/*/*.markdown >> $@; \
done

# for more accurate results, run with
Expand Down
26 changes: 8 additions & 18 deletions benchmarks.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
# Benchmarks

Here are some benchmarks, run on an ancient Thinkpad running Intel
Core 2 Duo at 2GHz. The input text is a 11MB Markdown file built by
concatenating the Markdown sources of all the localizations of the
first edition of
[*Pro Git*](https://github.com/progit/progit/tree/master/en) by Scott
Chacon.
Here are some benchmarks, run on a 2.3GHz 8-core i9 macbook pro.
The input text is a 1106 KB Markdown file built by concatenating
the Markdown sources of all the localizations of the first edition
of [*Pro Git*](https://github.com/progit/progit/tree/master/en) by
Scott Chacon.

|Implementation | Time (sec)|
|-------------------|-----------:|
| Markdown.pl | 2921.24 |
| Python markdown | 291.25 |
| PHP markdown | 20.82 |
| kramdown | 17.32 |
| cheapskate | 8.24 |
| peg-markdown | 5.45 |
| parsedown | 5.06 |
| **commonmark.js** | 2.09 |
| marked | 1.99 |
| discount | 1.85 |
| **cmark** | 0.29 |
| hoedown | 0.21 |
| **commonmark.js** | 0.59 |
| **cmark** | 0.12 |
| **md4c** | 0.04 |

To run these benchmarks, use `make bench PROG=/path/to/program`.

Expand Down

0 comments on commit 6f14040

Please sign in to comment.