[CONPY-280] Performance optimization for internal methods Created: 2024-01-30 Updated: 2024-01-31 Resolved: 2024-01-31 |
|
| Status: | Closed |
| Project: | MariaDB Connector/Python |
| Component/s: | Generic |
| Affects Version/s: | 1.1.9 |
| Fix Version/s: | 1.1.10 |
| Type: | Task | Priority: | Major |
| Reporter: | Georg Richter | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Python Version: | 3.10 |
| Description |
|
Internal methods like parse_statement, execute_text et. al. use METH_VARARGS in the PyMemberDef structure and parse the arguments via PyArg_ParseTuple. Since we don't need to check the types for variable arguments we should use METH_FASTCALL (which is available since Python 3.7) and declare the functions as _PyFuncFastCall. Methods which only expect a single parameter should use METH_O. |