Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-118761: Improve import time ofsqlite3#129118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Wulian233 wants to merge10 commits intopython:mainfromWulian233:sqlite

Conversation

Wulian233
Copy link
Contributor

@Wulian233Wulian233 commentedJan 21, 2025
edited
Loading

Improve import time ofsqlite3 by around 2 times

Benchmark on Windows10, Python official 3.13.1

D:\Python313>hyperfine --warmup 8 "./python -c 'from sqlite3 import *'" "./python -c 'from sqlite3_new import *'"Benchmark 1: ./python -c 'from sqlite3 import *'  Time (mean ± σ):     135.0 µs ± 174.7 µs    [User: 1743.5 µs, System: 2196.8 µs]  Range (min … max):     0.0 µs … 1225.1 µs    404 runsBenchmark 2: ./python -c 'from sqlite3_new import *'  Time (mean ± σ):     153.7 µs ± 196.7 µs    [User: 1868.9 µs, System: 1971.3 µs]  Range (min … max):     0.0 µs … 2125.8 µs    409 runsSummary  ./python -c 'from sqlite3 import *' ran    1.14 ± 2.07 times faster than ./python -c 'from sqlite3_new import *'

@erlend-aasland
Copy link
Contributor

Please leave out all unrelated comment changes.

Copy link
Member

@AA-TurnerAA-Turner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It may be worth adding comments to indicate why we do the lazy imports -- but optional.

A

@ghost
Copy link

ghost commentedFeb 3, 2025
edited by ghost
Loading

All commit authors signed the Contributor License Agreement.
CLA signed

@Wulian233
Copy link
ContributorAuthor

All commit authors signed the Contributor License Agreement.CLA signed

All the suggestion comments have been added, and this one appears because I have logged in to the wrong git account

@Wulian233
Copy link
ContributorAuthor

@erlend-aasland I just realized today that I accidentally deleted an unmerged branch last month, which resulted in closing this PR. My apologies for the oversight. I've now recreated the pull request - the content remains exactly the same as before. Appreciate your understanding

#131796

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@erlend-aaslanderlend-aaslanderlend-aasland approved these changes

@AA-TurnerAA-TurnerAA-Turner approved these changes

@berkerpeksagberkerpeksagAwaiting requested review from berkerpeksagberkerpeksag is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@Wulian233@erlend-aasland@AA-Turner

[8]ページ先頭

©2009-2025 Movatter.jp