Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mypyc to complie connection/cursor classes #446

Open
dvarrazzo opened this issue Nov 30, 2022 · 1 comment
Open

Use mypyc to complie connection/cursor classes #446

dvarrazzo opened this issue Nov 30, 2022 · 1 comment

Comments

@dvarrazzo
Copy link
Member

Profiling using py-spy is showing that psycopg is now nice and fast when it can stay down in the C level, but resurfacing back in Python has a visible impact.

Rewriting the whole classes in Cython would address the problem, but it's quite a major work.

Mypyc might fill the gap, making a good use of the extensive type annotations of the psycopg codebase.

@CaselIT
Copy link
Contributor

CaselIT commented Dec 12, 2022

Note that cython can also compile pure python code for a moderate performance advantage. See for example falcon
I'm not sure how it compares with mypyc however wrt performance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants