[pypy-commit] pypy.org extradoc: Add a paragraph "Abuse of itertools".
arigo
noreply at buildbot.pypy.org
Mon Feb 13 10:22:08 CET 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: extradoc
Changeset: r327:aa71b020271b
Date: 2012-02-13 10:15 +0100
http://bitbucket.org/pypy/pypy.org/changeset/aa71b020271b/
Log: Add a paragraph "Abuse of itertools".
diff --git a/source/performance.txt b/source/performance.txt
--- a/source/performance.txt
+++ b/source/performance.txt
@@ -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.
More information about the pypy-commit
mailing list