youbbs avatar

python Markdown 解析库速度比较

🕓 by youbbs

作者推荐 Misaka,mistune。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Misaka: A python binding for Sundown. (CPython required)
Hoedown: A python binding for Hoedown, successor of Misaka.
Discount: A python binding for Discount. (CPython required)
cMarkdown: Markdown for Python, accelerated by C. (CPython required)
Markdown: A pure markdown parser, the very first implementation.
Markdown2: Another pure markdown parser.
mistune: The fastest markdown parser in pure Python.

Parsing the Markdown Syntax document 1000 times...
Mistune: 12.7255s
Mistune (with Cython): 9.74075s
Misaka: 0.550502s
Markdown: 46.4342s
Markdown2: 78.2267s
cMarkdown: 0.664128s
http://lepture.com/en/2014/markdown-parsers-in-python

💘 相关文章

写一条评论

Based on Golang + fastHTTP + sdb | go1.17.1 Processed in 0ms