[issue44711] Optimize type check in pipes.py

Ma Lin report at bugs.python.org
Thu Jul 22 20:54:21 EDT 2021


Ma Lin <malincns at 163.com> added the comment:

> I suppose it is a very old code

I also found a few old code may have performance loss.

memoryview.cast() method was add in Python 3.3.
This code doesn't use memoryview.cast(), which will bring extra memory overhead when the amount of data is very large.
https://github.com/python/cpython/blob/v3.10.0b4/Lib/multiprocessing/connection.py#L190-L194

----------
nosy: +malin

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


More information about the Python-bugs-list mailing list