This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [sqlite3] speed up cursor.execute*()
Type: Stage: resolved
Components: Extension Modules Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: erlendaasland
Priority: normal Keywords: patch

Created on 2022-02-04 10:38 by erlendaasland, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 31127 closed erlendaasland, 2022-02-04 10:50
Messages (2)
msg412503 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2022-02-04 10:38
`pysqlite_connection_execute_impl()` and friends (executemany, executescript) goes all the way through the Call API just to call `pysqlite_connection_cursor_impl`. We can same a lot of calls by calling the cursor _impl function directly; after all, it does live in the same file scope as the callers.

A quick bench (sqlitesynth) shows a small speedup:

    Mean +- std dev: [main] 9.55 us +- 0.25 us -> [patched] 9.32 us +- 0.23 us: 1.02x faster



(Side effect: will get rid of _Py_IDENTIFIER(cursor) in sqlite3)
msg413390 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2022-02-17 08:26
The change proposed in GH-31127 was included in GH-31351. Closing this.
History
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90792
2022-02-17 08:26:39erlendaaslandsetstatus: open -> closed
resolution: fixed
messages: + msg413390

stage: patch review -> resolved
2022-02-04 10:50:59erlendaaslandsetkeywords: + patch
stage: patch review
pull_requests: + pull_request29306
2022-02-04 10:38:53erlendaaslandcreate