Original Translation
2867
The new I/O library (as defined in :pep:`3116`) was mostly written in Python and quickly proved to be a problematic bottleneck in Python 3.0. In Python 3.1, the I/O library has been entirely rewritten in C and is 2 to 20 times faster depending on the task at hand. The pure Python version is still available for experimentation purposes through the ``_pyio`` module.
2868
(Contributed by Amaury Forgeot d'Arc and Antoine Pitrou.)
2869
Added a heuristic so that tuples and dicts containing only untrackable objects are not tracked by the garbage collector. This can reduce the size of collections and therefore the garbage collection overhead on long-running programs, depending on their particular use of datatypes.
2870
(Contributed by Antoine Pitrou, :issue:`4688`.)
2871
Enabling a configure option named ``--with-computed-gotos`` on compilers that support it (notably: gcc, SunPro, icc), the bytecode evaluation loop is compiled with a new dispatch mechanism which gives speedups of up to 20%, depending on the system, the compiler, and the benchmark.
2872
(Contributed by Antoine Pitrou along with a number of other participants, :issue:`4753`).
2873
The decoding of UTF-8, UTF-16 and LATIN-1 is now two to four times faster.
2874
(Contributed by Antoine Pitrou and Amaury Forgeot d'Arc, :issue:`4868`.)
2875
The :mod:`json` module now has a C extension to substantially improve its performance. In addition, the API was modified so that json works only with :class:`str`, not with :class:`bytes`. That change makes the module closely match the `JSON specification <http://json.org/>`_ which is defined in terms of Unicode.
2876
(Contributed by Bob Ippolito and converted to Py3.1 by Antoine Pitrou and Benjamin Peterson; :issue:`4136`.)