Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Markdown Performance Comparison 26
(version: 0)
A performance comparison of leading Javascript Markdown implementations.
Comparing performance of:
Marked vs CommonMark vs Markdown-it vs Remarkable vs Micromarkdown vs Snarkdown
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 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 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()].join("\n");}
Tests:
Marked
conv.marked(md());
CommonMark
conv.cm.render(pars.cm.parse(md()));
Markdown-it
conv.mdit.render(md());
Remarkable
conv.remarkable.render(md());
Micromarkdown
conv.micromarkdown.parse(md());
Snarkdown
conv.snarkdown(md());
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (6)
Previous results
Fork
Test case name
Result
Marked
CommonMark
Markdown-it
Remarkable
Micromarkdown
Snarkdown
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 explanation of what's being tested on MeasureThat.net. **Benchmark Overview** The benchmark compares the performance of six different Markdown implementations: Marked, CommonMark, Markdown-it, Remarkable, Micromarkdown, and Snarkdown. The goal is to determine which implementation performs best in terms of execution speed. **Options Compared** Each test case compares a single Markdown implementation against another baseline (usually CommonMark). The options compared are: 1. **Marked vs. CommonMark**: This option tests the performance difference between Marked, which is a pure JavaScript Markdown parser, and CommonMark, which is a browser-based implementation. 2. **Markdown-it vs. Remarkable**: This option compares the performance of Markdown-it, a lightweight JavaScript library for parsing Markdown, against Remarkable, a more feature-rich Markdown editor with a focus on user experience. 3. **Micromarkdown vs. Snarkdown**: This option tests the performance of Micromarkdown, a small and lightweight JavaScript Markdown parser, against Snarkdown, a more comprehensive Markdown implementation with advanced features. **Pros and Cons** Each Markdown implementation has its strengths and weaknesses: * **Marked**: Fast execution speed, but limited feature set. * **CommonMark**: Robust feature set, but slower execution speed due to browser-based rendering. * **Markdown-it**: Lightweight and fast, but lacks some advanced features. * **Remarkable**: User-friendly interface, but slower execution speed compared to other options. * **Micromarkdown**: Extremely lightweight and fast, but has a limited number of features. * **Snarkdown**: Comprehensive feature set, but slower execution speed. **Library Descriptions** 1. **marked**: A pure JavaScript Markdown parser developed by John Resig. It is known for its simplicity and ease of use. 2. **commonmark**: A browser-based implementation of the CommonMark specification, which provides a robust feature set while maintaining fast performance. 3. **markdown-it**: A lightweight JavaScript library for parsing Markdown, developed by Marked. It is designed to be simple and efficient while still providing many advanced features. 4. **remarkable**: A more comprehensive Markdown editor with a focus on user experience. It offers advanced features like syntax highlighting and code blocks. 5. **micromarkdown**: A small and lightweight JavaScript Markdown parser, developed by Hans-Michael Wilschut. It is known for its extreme simplicity and speed. **Special JS Features or Syntax** The benchmark uses some special JavaScript features: 1. **`Math.random()`**: Used to generate random text in the `md()` function. 2. **`window.micromarkdown` and `window.snarkdown`**: These are browser globals that reference the Micromarkdown and Snarkdown libraries, respectively. **Other Alternatives** If you're interested in exploring other Markdown implementations or alternatives, some notable options include: 1. **DOMPurify**: A JavaScript library for sanitizing HTML input from user-generated content. 2. **Prism.js**: A lightweight JavaScript library for syntax highlighting and code blocks. 3. **Showdoc**: A lightweight JavaScript library for displaying Markdown documents. I hope this explanation helps!
Related benchmarks:
Number vs + vs parseFloat
Number vs + vs parseInt
Math.floor(Math.random() * 1000000000).toString() vs window.performance.now().toFixed()
Markdown Performance Comparison - DU
Markdown Performance Comparison 113
Comments
Confirm delete:
Do you really want to delete benchmark?