Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark #1

Closed
lepture opened this issue Feb 25, 2014 · 2 comments
Closed

Benchmark #1

lepture opened this issue Feb 25, 2014 · 2 comments

Comments

@lepture
Copy link
Owner

lepture commented Feb 25, 2014

Read this: http://lepture.com/en/2014/markdown-parsers-in-python

Enable all features, without Cython.

Parsing the Markdown Syntax document 1000 times...
Mistune: 12.9425s
Misaka: 0.537176s
Markdown: 47.7091s
Markdown2: 80.5163s
cMarkdown: 0.680664s
Discount is not available

Parsing the Markdown Syntax document 1000 times...
Mistune: 12.7255s
Misaka: 0.553476s
Markdown: 47.9369s
Markdown2: 79.5075s
cMarkdown: 0.71733s
Discount is not available

With Cython

Parsing the Markdown Syntax document 1000 times...
Mistune: 9.78976s
Misaka: 0.528333s
Markdown: 46.3091s
Markdown2: 76.3403s
cMarkdown: 0.674922s
Discount is not available

Parsing the Markdown Syntax document 1000 times...
Mistune: 9.74075s
Misaka: 0.550502s
Markdown: 46.4342s
Markdown2: 78.2267s
cMarkdown: 0.664128s
Discount is not available

Benchmark with PyPy

Parsing the Markdown Syntax document 1000 times...
Mistune: 8.36888s
Misaka is not available
/Users/lepture/.venvs/pypy/site-packages/markdown/blockprocessors.py:151: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  (len(parent) and parent[-1] and \
/Users/lepture/.venvs/pypy/site-packages/markdown/blockparser.py:94: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if processor.test(parent, blocks[0]):
Markdown: 30.9723s
Markdown2: 88.4563s
cMarkdown is not available
Discount is not available

Parsing the Markdown Syntax document 1000 times...
Mistune: 8.31194s
Misaka is not available
/Users/lepture/.venvs/pypy/site-packages/markdown/blockprocessors.py:151: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  (len(parent) and parent[-1] and \
/Users/lepture/.venvs/pypy/site-packages/markdown/blockparser.py:94: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if processor.test(parent, blocks[0]):
Markdown: 31.6023s
Markdown2: 85.5509s
cMarkdown is not available
Discount is not available

https://github.com/lepture/mistune/blob/master/tests/bench.py

@lepture
Copy link
Owner Author

lepture commented Jun 19, 2014

Parsing the Markdown Syntax document 1000 times...
Mistune: 9.676753
Misaka: 0.552392
Markdown: 46.059252
Markdown2: 77.199359
cMarkdown: 0.663649
Discount is not available
Hoep: 0.547027

#10

@fernandosavio
Copy link

Did you try to benchmark with Numba ?

@lepture lepture closed this as completed Jul 12, 2014
love-adela added a commit to love-adela/bohemianbinary-blog that referenced this issue Aug 25, 2019
라이브러리는 Misaka, Hoedown, Mistune를 선정하였음.

* [Misaka](https://misaka.61924.nl/#)
  - Sundown Python 바인딩. Sundown은 현재 deprected.
  - 코드 하이라이팅 기능 있음

* [python-hoedown](https://github.com/hhatto/python-hoedow) 라이브러리
  - Deprected Sundown 라이브러리를 포크한 Python
바인딩(Hoedown)
  - Misaka 라이브러리의 기능을 가지고 있음
  - Pypy compatible
  - Footnote 기능 있음

* [Mistune](https://mistune.readthedocs.io/en/latest/)
  - Python-Markdown 라이브러리보다 4배 빠르다고 함
    - lepture/mistune#1
  - 최신 라이브러리. 2018-10-11에 Version 0.8.4 release
  - Full featured. autolink, strikethrough, table, fenced code, footnotes 지원
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants