Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Markdown–DOM Performance Comparison 10
(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().substring(0,100)); } catch { inp = md().substring(0,100);} (new DOMParser()).parseFromString(inp, 'text/html');
markdown-wasm-normal
try { markdown.parse(md()); } catch {; }
markdown-it
(new DOMParser()).parseFromString(conv.mdit.render(md().substring(0,100)), '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'd be happy to help explain the benchmark and its various components. **Overview** The provided JSON represents a performance benchmark for different JavaScript Markdown implementations. The goal is to compare the execution speed of these libraries on a sample input text, which is stored in the `md()` function variable. **Benchmark Definition** The benchmark definition involves creating a JavaScript object (`conv`) that contains references to various Markdown libraries (e.g., marked, commonmark, markdown-it, remarkable, micromarkdown, snarkdown). Each library is assigned a specific instance or method (`render()`, `parse()`, etc.) that will be used to process the input text. **Options Compared** The benchmark compares the execution speed of different Markdown libraries in the following order: 1. **marked**: uses the marked library for rendering and parsing 2. **commonmark**: uses the commonmark library for rendering and parsing 3. **markdown-it-normal**: uses the markdown-it library with default settings for rendering and parsing 4. **remarkable**: uses the remarkable library for rendering and parsing 5. **micromarkdown**: uses the micromarkdown library for parsing (note: this one is not rendering) 6. **markdown-wasm** (and its variants): uses a WebAssembly-based implementation of Markdown 7. **markdown-it**: uses the markdown-it library with custom settings for rendering **Pros and Cons** Here's a brief overview of each library: 1. **marked**: widely used, efficient, but has some limitations in terms of features and customization. 2. **commonmark**: designed to be highly customizable and extensible, but may have performance implications due to its complexity. 3. **markdown-it-normal**: a popular choice for its ease of use and flexibility, but might not be as performant as other options. 4. **remarkable**: optimized for performance and readability, but has some limitations in terms of customization and feature set. 5. **micromarkdown**: specifically designed for parsing, which can lead to faster execution times, but may lack rendering capabilities. 6. **markdown-wasm**: WebAssembly-based implementation offers potential performance benefits, but its usage and compatibility may be limited due to the new technology. 7. **markdown-it**: similar to marked, but with custom settings, which might provide better performance or features. **Results** The benchmark results show that: * markdown-wasm-normal has the highest execution speed * micromarkdown has a close second * remarkable and markdown-it also perform well * marked and commonmark have slower execution speeds Keep in mind that these results may vary depending on specific use cases, input data, and other factors. I hope this explanation helps you understand the benchmark and its components!
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?