python Markdown 解析库速度比较

By youbbs at 2015-04-14 23:14:46 • 1039次点击

作者推荐 Misaka,mistune。

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 14

python, markdown, , 速度


登录 后发表评论