Message326659
An arg clinic specification such as
p: object(subclass_of='&PyTuple_Type')
generates slow code using _PyArg_ParseStack() that has to parse a format string like "O!" to decide to make a type check. Instead, it should directly generate a branch-predictable test for the type check and then call the much quicker function _PyArg_UnpackStack().
See https://github.com/python/cpython/pull/9628 for an example of this change giving a 30% speedup. |
|
Date |
User |
Action |
Args |
2018-09-28 21:15:58 | rhettinger | set | recipients:
+ rhettinger, vstinner, larry, serhiy.storchaka |
2018-09-28 21:15:58 | rhettinger | set | messageid: <1538169358.96.0.545547206417.issue34838@psf.upfronthosting.co.za> |
2018-09-28 21:15:58 | rhettinger | link | issue34838 messages |
2018-09-28 21:15:58 | rhettinger | create | |
|