Performance of CommonMark reference implementations

Good question; @jgm do you have a set of “reference” documents in markdown (probably large ones, with lots of markdown features in the doc) that could be used for benchmarking speed of implementations?

There’s this Git repo with lots of user-written documentation for Linode, it contains 1978 .md files with a total size of 15.08MB.

$ git clone git://github.com/linode/docs.git linode-docs
$ cd linode-docs
$ git ls-files | grep '\.md$' | wc -l
1978
$ git ls-files | grep '\.md$' | xargs -d\\n cat >out.md
$ wc out.md
  300232  1955585 15077840 out.md

But even 15.08MB takes just half a second to process here, amazing:

$ time cmark out.md >out.html

real    0m0.435s
user    0m0.346s
sys     0m0.088s

Maybe this archive can be used for benchmarks, as it contains lots of different files.

1 Like