Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Markdown Performance Comparison 20
(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() }; var md = "# Short test\n\nthis is a *short* test, a short test to check how this thing does with a pretty _short piece of text. Also,\n\n> This is a quote\n\nSo there.";
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 provided JSON and explain what's being tested, compared, and their pros and cons. **Benchmark Definition** The benchmark compares the performance of six JavaScript Markdown implementations: Marked, CommonMark, Markdown-it, Remarkable, Micromarkdown, and Snarkdown. The test case uses a predefined Markdown string (`md`) and prepares it for each library by creating an object `conv` with the libraries as properties. **Library Explanation** 1. **marked**: A popular, lightweight Markdown parser. 2. **commonmark**: A more comprehensive Markdown implementation that includes features like table support and inline code blocks. 3. **markdown-it**: A feature-rich Markdown parser with plugins for adding additional functionality (e.g., syntax highlighting). 4. **remarkable**: A Markdown parser that uses a syntax similar to Markdown but with some notable differences (e.g., no headers). 5. **micromarkdown**: A lightweight, fast Markdown parser. 6. **snarkdown**: A fast and feature-rich Markdown parser. **Options Compared** The benchmark compares the execution speed of each library when parsing the same Markdown string. The test case measures the number of executions per second (ExecutionsPerSecond) for each library. **Pros and Cons** 1. **marked**: Fast, lightweight, but might not be as feature-rich as other libraries. 2. **commonmark**: Comprehensive, but potentially slower due to its larger size and feature set. 3. **markdown-it**: Feature-rich, but might be slower than smaller libraries like micromarkdown. 4. **remarkable**: Similar to marked, but with a different syntax. 5. **micromarkdown**: Extremely lightweight and fast, but might not support as many features. 6. **snarkdown**: Fast and feature-rich, similar to markdown-it. **Other Considerations** * Performance: Micromarkdown is the fastest, while commonmark is slower due to its larger size. * Feature set: marked and remarkable have a more limited set of features compared to commonmark, markdown-it, and snarkdown. * Syntax: Remarkable uses a syntax similar to Markdown but with some differences. **Alternative Options** If you're looking for alternatives, consider the following: 1. **MDParser**: A lightweight, fast Markdown parser that's designed for high-performance use cases. 2. **ShowDoc**: A Markdown parser that's optimized for reading and parsing large documents. 3. **md-parser-js**: A minimalist Markdown parser that's designed for simplicity and performance. Keep in mind that each library has its strengths and weaknesses, and the choice ultimately depends on your specific needs and requirements.
Related benchmarks:
Markdown Performance Comparison 21
Markdown Performance Comparison 25
Long Text Markdown Performance Comparison
Markdown Performance Comparison 2023-06-23 (2)
Comments
Confirm delete:
Do you really want to delete benchmark?