Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Markdown–DOM Performance Comparison 8
(version: 0)
A performance comparison of leading Javascript Markdown implementations.
Comparing performance of:
Marked vs CommonMark vs Markdown-it-normal vs Remarkable vs Micromarkdown vs markdown-wasm vs markdown-wasm-normal vs markdown-it
Created:
4 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<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> <script type="text/javascript" src="https://lukeuser.cacus.feralhosting.com/markdown.js"></script>
Script Preparation code:
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 md() { return "# The Static, Static Blog Generator\n\n### May 17th, 2014\n\nWe all like publishing our thoughts online - but why is it such a bother to run a CMS?\n\nManaging databases, updating software, and keeping track of our content often cuts into the most important activity: *expressing ourselves*.\n\nThe web makes it really easy to share our thoughts with millions of individuals from around the world." }
Tests:
Marked
conv.marked(md());
CommonMark
conv.cm.render(pars.cm.parse(md()));
Markdown-it-normal
conv.mdit.render(md());
Remarkable
conv.remarkable.render(md());
Micromarkdown
conv.micromarkdown.parse(md(),true);
markdown-wasm
var inp; try { inp = markdown.parse(md()); } catch { inp = md();} (new DOMParser()).parseFromString(inp, 'text/html');
markdown-wasm-normal
try { markdown.parse(md()); } catch {; }
markdown-it
(new DOMParser()).parseFromString(conv.mdit.render(md()), 'text/html');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (8)
Previous results
Fork
Test case name
Result
Marked
CommonMark
Markdown-it-normal
Remarkable
Micromarkdown
markdown-wasm
markdown-wasm-normal
markdown-it
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
I'll break down the provided benchmark definition, script preparation code, and individual test cases to explain what's being tested. **Benchmark Definition** The website MeasureThat.net provides a JSON representation of a benchmark, which includes: * A name for the benchmark * A description of the benchmark * Script preparation code that initializes various Markdown libraries (marked, commonmark, markdown-it, remarkable, micromarkdown, and snarkdown) * Html Preparation Code: URLs to load the necessary JavaScript files for each library **Individual Test Cases** The JSON representation includes an array of individual test cases: * Each test case has a unique name * A benchmark definition (a JavaScript function call) that uses one of the Markdown libraries * The purpose of each test case is to measure the performance of the corresponding Markdown library. Here's a breakdown of what's being tested in each test case: 1. **Marked**: Tests the "marked" library. * Pros: Marked is a lightweight, easy-to-use Markdown parser. * Cons: May not handle complex Markdown syntax well. 2. **CommonMark**: Tests the "commonmark" library. * Pros: Provides a robust and standard-compliant Markdown parsing solution. * Cons: May be heavier-weight than other libraries, requiring more CPU resources. 3. **Markdown-it-normal**: Tests the "markdown-it" library with normal rendering (i.e., no compilation). * Pros: Offers flexible rendering options and can handle complex Markdown syntax. * Cons: Requires additional setup for compiling Markdown to HTML. 4. **Remarkable**: Tests the "remarkable" library. * Pros: Provides a fast and lightweight solution with features like automatic table of contents generation. * Cons: May not support all Markdown features or have limitations in rendering complex documents. 5. **Micromarkdown**: Tests the "micromarkdown" library. * Pros: Offers a high-performance, minimalist approach to parsing Markdown syntax. * Cons: May lack some features and flexibility compared to other libraries. **Performance Results** The provided results show the execution speed (in executions per second) for each test case on a Windows 10 machine with Firefox 89. Each library's performance can be ranked based on its execution speed, which is typically an important factor in determining the best Markdown parsing solution for specific use cases.
Related benchmarks:
Markdown Performance Comparison 4
Markdown Performance Comparison 13
Markdown Performance Comparison 18
Markdown Performance Comparison 22
Markdown Performance Comparison 14
Comments
Confirm delete:
Do you really want to delete benchmark?