Test name | Executions per second |
---|---|
Marked | 8920.4 Ops/sec |
CommonMark | 6970.8 Ops/sec |
Markdown-it | 7783.4 Ops/sec |
Remarkable | 9910.5 Ops/sec |
Micromarkdown | 14348.6 Ops/sec |
Snarkdown | 12513.7 Ops/sec |
<script type="text/javascript" src="https://unpkg.com/marked@1.1.0/marked.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/commonmark@0.29.1/dist/commonmark.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/markdown-it@11.0.0/dist/markdown-it.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/remarkable@2.0.1/dist/remarkable.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/micromarkdown@0.3.0/dist/micromarkdown.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/snarkdown@1.2.2/dist/snarkdown.umd.js"></script>
var conv = {
marked: marked,
cm: new commonmark.HtmlRenderer(),
mdit: markdownit({ html: true }),
remarkable: new remarkable.Remarkable(),
micromarkdown: window.micromarkdown,
snarkdown: window.snarkdown,
};
var pars = {
cm: new commonmark.Parser()
};
function randword() {return Math.random().toString(36).substring(2, 15)+" "}
function md() { return [randword(),randword()+randword(),"## "+randword(),"","","1. "+randword(),"2. "+randword(),"","","---","","***"+randword()+"***","",
randword(),randword()+randword()+randword()+randword(),randword()+randword()+randword()+randword(),randword(),"",randword()+randword()+randword(),randword(),randword(),
randword(),randword()+randword()+randword()+randword(),randword()+randword()+randword()+randword(),randword(),"",randword()+randword()+randword(),randword(),randword(),
randword(),randword()+randword()+randword()+randword(),randword()+randword()+randword()+randword(),randword(),"",randword()+randword()+randword(),randword(),randword()].join("\n");}
//var [md1, md2, md3, md4, md5, md6] = [md(), md(), md(), md(), md(), md()]
conv.marked(md());
conv.cm.render(pars.cm.parse(md()));
conv.mdit.render(md());
conv.remarkable.render(md());
conv.micromarkdown.parse(md());
conv.snarkdown(md());