Benchmarks

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

ImplementationTime (sec)Factor
Markdown.pl2921.2414606.2
PHP markdown20.85104.3
kramdown20.83104.1
lunamark6.29531.5
cheapskate5.76028.8
peg-markdown5.45027.3
commonmark.js2.67513.4
marked1.8559.3
discount1.7058.5
cmark0.2951.5
sundown0.2001.0

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

The input text is a 10MB Markdown file built by concatenating 20 copies of the Markdown source 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.) A median of ten runs is taken. The process is reniced to a high priority so that the system doesn't interrupt runs.