Skip to content
Snippets Groups Projects
Commit aa71b020 authored by Armin Rigo's avatar Armin Rigo
Browse files

Add a paragraph "Abuse of itertools".

parent b51f57e3
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,15 @@
sometimes not. In most cases (like ``csv`` and ``cPickle``), we're slower
than cPython, with the notable exception of ``json`` and ``heapq``.
* **Abuse of itertools**: The itertools module is often "abused" in the
sense that it is used for the wrong purposes. From our point of view,
itertools is great if you have iterations over millions of items, but
not for most other cases. It gives you 3 lines in functional style
that replace 10 lines of Python loops (longer but arguably much easier
to read). The pure Python version is generally not slower even on
CPython, and on PyPy it allows the JIT to work much better --- simple
Python code is fast.
We generally consider things that are slower on PyPy than CPython to be bugs
of PyPy. If you find some issue that is not documented here,
please report it to our `bug tracker`_ for investigation.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment