Skip to content

Stark performance drop-off in Python #1596

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

Open
triceo opened this issue May 19, 2025 · 2 comments
Open

Stark performance drop-off in Python #1596

triceo opened this issue May 19, 2025 · 2 comments
Assignees
Labels
language/python Is related specifically to Python code.

Comments

@triceo
Copy link
Contributor

triceo commented May 19, 2025

Discussed in #1579

In the example given in the above discussion, there is a stark difference in performance between our Python and Java solvers.

Whereas the Java solver gets to 500k/sec, the Python solver gets under a 100/sec. This is a 5000x difference.

@triceo triceo added the language/python Is related specifically to Python code. label May 21, 2025
@ge0ffrey
Copy link
Contributor

ge0ffrey commented May 26, 2025

I've seen cases happen that Python is pretty fast, but when one extra constraint is added, it becomes very slow.
IIRC @Christopher-Chianelli said it's related to the cut-off on how deep a method can be before the python-to-jvm bytecode transpiler falls back to interpretation?

Not sure if it's the same issue as #1579 though

@Christopher-Chianelli
Copy link
Contributor

I suspect #1579 might be using Pydantic; I recall something happen in Pydantic for 3.11 or 3.12 that causes attribute access to massively slow down. Pydantic does have some C parts in; unsure if that related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/python Is related specifically to Python code.
Projects
None yet
Development

No branches or pull requests

3 participants