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

Typo in capitalization. Regen.

parent 656ba44c
No related branches found
No related tags found
No related merge requests found
......@@ -99,10 +99,22 @@
might be worthwhile to consider rewriting it as a pure Python version
that uses something like <tt class="docutils literal">ctypes</tt> for the interface.</li>
<li><strong>Missing RPython modules</strong>: A few modules of the standard library
(like <tt class="docutils literal">csv</tt> and <tt class="docutils literal">cPickle</tt>) are in C in CPython, but in pure Python
in PyPy. Sometimes the JIT is able to do a good job on them, and
sometimes not. In most cases (like <tt class="docutils literal">csv</tt> and <tt class="docutils literal">cPickle</tt>), we're slower
than cPython, with the notable exception of <tt class="docutils literal">json</tt> and <tt class="docutils literal">heapq</tt>.</li>
(like <tt class="docutils literal">csv</tt> and <tt class="docutils literal">cPickle</tt>) are written in C in CPython, but written
natively in pure Python in PyPy. Sometimes the JIT is able to do a
good job on them, and sometimes not. In most cases (like <tt class="docutils literal">csv</tt> and
<tt class="docutils literal">cPickle</tt>), we're slower than CPython, with the notable exception of
<tt class="docutils literal">json</tt> and <tt class="docutils literal">heapq</tt>.</li>
<li><strong>Abuse of itertools</strong>: The itertools module is often &ldquo;abused&rdquo; 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 &ndash; simple
Python code is fast. The same argument also applies to <tt class="docutils literal">filter()</tt>,
<tt class="docutils literal">reduce()</tt>, and to some extend <tt class="docutils literal">map()</tt> (although the simple case
is JITted), and to all usages of the <tt class="docutils literal">operator</tt> module we can think
of.</li>
</ul>
<p>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,
......
......@@ -66,7 +66,7 @@
(like ``csv`` and ``cPickle``) are written in C in CPython, but written
natively in pure Python in PyPy. Sometimes the JIT is able to do a
good job on them, and sometimes not. In most cases (like ``csv`` and
``cPickle``), we're slower than cPython, with the notable exception of
``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
......
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