[Python-Dev] PEP 576/579/580 benchmark: mistune
J.Demeyer at UGent.be
Fri Jul 27 09:35:14 EDT 2018
since my latest benchmark for PEP 580  involved SageMath, which is
quite a big project, I instead propose a much simpler benchmark
mistune  is a Markdown parser implemented in the Python language. It
optionally allows Cython compilation. It doesn't use any kind of
optimization beyond that, but I created a branch  to use extension
types instead of Python classes.
Cython can either use built-in functions/methods or a custom class
(which is not optimized but which would be optimized with PEP 580).
I benchmarked mistune with custom classes  (binding=True, the
default) and with built-in functions/methods  (binding=False). This
is the median time of 5 runs:
So this shows again that PEP 580 improves performance in actual
real-world use cases.
More information about the Python-Dev