pep550: Move pics one level up to show up on Python.org (#332)
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
12
pep-0550.rst
|
@ -233,7 +233,7 @@ For regular Python code, EC behaves just like a thread-local. Any
|
||||||
modification of the EC object produces a new one, which is immediately
|
modification of the EC object produces a new one, which is immediately
|
||||||
set as the current one for the thread state.
|
set as the current one for the thread state.
|
||||||
|
|
||||||
.. figure:: pep-0550/functions.png
|
.. figure:: pep-0550-functions.png
|
||||||
:align: center
|
:align: center
|
||||||
:width: 90%
|
:width: 90%
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@ is needed:
|
||||||
Figure 2 below illustrates how execution context mutations work with
|
Figure 2 below illustrates how execution context mutations work with
|
||||||
coroutines.
|
coroutines.
|
||||||
|
|
||||||
.. figure:: pep-0550/coroutines.png
|
.. figure:: pep-0550-coroutines.png
|
||||||
:align: center
|
:align: center
|
||||||
:width: 90%
|
:width: 90%
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ is never modified by the interpreter. ``yield from o`` expression in
|
||||||
regular generators that are not decorated with ``types.coroutine``,
|
regular generators that are not decorated with ``types.coroutine``,
|
||||||
is semantically equivalent to ``for v in o: yield v``.
|
is semantically equivalent to ``for v in o: yield v``.
|
||||||
|
|
||||||
.. figure:: pep-0550/generators.png
|
.. figure:: pep-0550-generators.png
|
||||||
:align: center
|
:align: center
|
||||||
:width: 90%
|
:width: 90%
|
||||||
|
|
||||||
|
@ -641,7 +641,7 @@ While working on the reference implementation of this PEP, we were
|
||||||
able to optimize ``dict.copy()`` operation **5.5x**, see [4]_ for
|
able to optimize ``dict.copy()`` operation **5.5x**, see [4]_ for
|
||||||
details.
|
details.
|
||||||
|
|
||||||
.. figure:: pep-0550/dict_copy.png
|
.. figure:: pep-0550-dict_copy.png
|
||||||
:align: center
|
:align: center
|
||||||
:width: 100%
|
:width: 100%
|
||||||
|
|
||||||
|
@ -708,7 +708,7 @@ be essentially O(1) for relatively small mappings in EC.
|
||||||
To assess if HAMT can be used for Execution Context, we implemented
|
To assess if HAMT can be used for Execution Context, we implemented
|
||||||
it in CPython [7]_.
|
it in CPython [7]_.
|
||||||
|
|
||||||
.. figure:: pep-0550/hamt_vs_dict.png
|
.. figure:: pep-0550-hamt_vs_dict.png
|
||||||
:align: center
|
:align: center
|
||||||
:width: 100%
|
:width: 100%
|
||||||
|
|
||||||
|
@ -718,7 +718,7 @@ Figure 5 shows that HAMT indeed displays O(1) performance for all
|
||||||
benchmarked dictionary sizes. For dictionaries with less than 100
|
benchmarked dictionary sizes. For dictionaries with less than 100
|
||||||
items, HAMT is a bit slower than Python dict/shallow copy.
|
items, HAMT is a bit slower than Python dict/shallow copy.
|
||||||
|
|
||||||
.. figure:: pep-0550/lookup_hamt.png
|
.. figure:: pep-0550-lookup_hamt.png
|
||||||
:align: center
|
:align: center
|
||||||
:width: 100%
|
:width: 100%
|
||||||
|
|
||||||
|
|