Skip to content

Speed up Enum lookup - #1296

Merged
Joao-Dionisio merged 3 commits into
masterfrom
enum-lookup
Nov 18, 2026
Merged

Joao-Dionisio merged 3 commits into
masterfrom
enum-lookup

Conversation

@Joao-Dionisio

Copy link
Copy Markdown
Member

#1286 introduced a bit of a slowdown. It's nothing that would be super noticeable, but it's still something I'd be more comfortable with speeding up. Here's how individual calls look like:

image

Which corresponds to the following slowdown:

image

As I said, not huge, but still something. In this PR, we create dicts to speed up the lookup.

I also added missing flags for events and heuristic timings, etc.

@Joao-Dionisio Joao-Dionisio changed the title Enum lookup Speed up Enum lookup Nov 17, 2026
@Joao-Dionisio

Copy link
Copy Markdown
Member Author

@jonathanberthias would you mind taking a look, please?

@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 59.61538% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.58%. Comparing base (3653fbf) to head (8584ac7).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
src/pyscipopt/scip.pxi 48.78% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1296      +/-   ##
==========================================
- Coverage   58.15%   57.58%   -0.58%     
==========================================
  Files          27       27              
  Lines        6012     6042      +30     
==========================================
- Hits         3496     3479      -17     
- Misses       2516     2563      +47     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jonathanberthias jonathanberthias left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nice way to speed things up!

@Joao-Dionisio
Joao-Dionisio merged commit e543a84 into master Nov 18, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants