Message358287
The keyword argument extraction/finding function seems to have a performance bug/enhancement (unless I am missing something here). It reads:
```
for (i=0; i < nkwargs; i++) {
PyObject *kwname = PyTuple_GET_ITEM(kwnames, i);
/* ptr==ptr should match in most cases since keyword keys
should be interned strings */
if (kwname == key) {
return kwstack[i];
}
assert(PyUnicode_Check(kwname));
if (_PyUnicode_EQ(kwname, key)) {
return kwstack[i];
}
}
```
However, it should be split into two separate for loops, using the `PyUnicode_EQ` check only if it failed for _all_ other arguments.
I will open a PR for this (it seemed like a bpo number is wanted for almost everything. |
|
Date |
User |
Action |
Args |
2019-12-12 04:04:55 | seberg | set | recipients:
+ seberg |
2019-12-12 04:04:55 | seberg | set | messageid: <1576123495.69.0.334207747364.issue39028@roundup.psfhosted.org> |
2019-12-12 04:04:55 | seberg | link | issue39028 messages |
2019-12-12 04:04:55 | seberg | create | |
|