packaging icon indicating copy to clipboard operation
packaging copied to clipboard

Improve performance in _manylinux.py

Open cthoyt opened this issue 9 months ago • 0 comments

This PR makes a few performance improvements:

  1. Reduces the doubled call to _is_compatible(arch, glibc_version)
  2. Moves the assignment of the tag variable directly into the yield, reducing memory allocation in case this is never used when _is_compatible(arch, glibc_version) is false
  3. Uses an assignment expression for dictionary lookup

cthoyt avatar Jan 31 '25 11:01 cthoyt