mypy
e7846d96 - [mypyc] Update vec value struct to have direct pointer to items (#21420)

Commit
53 days ago
[mypyc] Update vec value struct to have direct pointer to items (#21420) Now the second field of a `vec` struct representation points to the first data item. Previously the second field of the `vec` struct representation was a `PyObject *` targeting the buffer object. This removes one pointer addition per get item or set item operation. Since these are often the most performance critical operations, we want them to be as efficient as possible. This should reduce the number of instructions at least on ARM, and it will reduce code size on x64 as well. Since vec is still behind a feature flag, we can still break the ABI. Used heavy coding agent assist, but iterated until the results look good.
Author
Parents
Loading