Benchmarks

Some benchmarks, run on an ancient Thinkpad running Intel Core 2 Duo at 2GHz.

ImplementationTime (sec)
Markdown.pl2921.24
Python markdown291.25
PHP markdown20.82
kramdown17.32
cheapskate8.24
peg-markdown5.45
parsedown5.06
marked1.94
commonmark.js1.93
discount1.86
cmark0.36
sundown0.34

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

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 by Scott Chacon.

time is used to measure execution speed. The reported time is the difference between the time to run the program with the benchmark input and the time to run it with no input. (This procedure ensures that implementations in dynamic languages are not penalized by startup time.) Amedian of ten runs is taken. The process is reniced to a high priority so that the system doesn't interrupt runs.