[issue36030] add internal API function to create tuple without items array initialization

Sergey Fedoseev report at bugs.python.org
Wed Feb 27 02:57:24 EST 2019


Sergey Fedoseev <fedoseev.sergey at gmail.com> added the comment:

> Can you please convert msg336142 into a perf script?
> And then run again these benchmarks on PR 12052.

+--------------------+---------+------------------------------+
| Benchmark          | ref     | untracked                    |
+====================+=========+==============================+
| list_as_tuple(0)   | 50.7 ns | 45.5 ns: 1.12x faster (-10%) |
+--------------------+---------+------------------------------+
| list_as_tuple(1)   | 64.5 ns | 56.5 ns: 1.14x faster (-12%) |
+--------------------+---------+------------------------------+
| list_as_tuple(5)   | 72.0 ns | 62.6 ns: 1.15x faster (-13%) |
+--------------------+---------+------------------------------+
| list_as_tuple(10)  | 86.3 ns | 77.1 ns: 1.12x faster (-11%) |
+--------------------+---------+------------------------------+
| list_as_tuple(100) | 469 ns  | 450 ns: 1.04x faster (-4%)   |
+--------------------+---------+------------------------------+

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36030>
_______________________________________


More information about the Python-bugs-list mailing list