Skip to content

Improve Performance of Variable Order Computation - #797

Merged
aannleax merged 4 commits into
mainfrom
performance/variable-orders
Aug 5, 2026
Merged

Improve Performance of Variable Order Computation#797
aannleax merged 4 commits into
mainfrom
performance/variable-orders

Conversation

@aannleax

@aannleax aannleax commented Aug 4, 2026

Copy link
Copy Markdown
Member

After the dependency graph computation, the variable order computation had the highest impact on large rule sets. This PR improves the performance by reducing memory allocations and rewriting the algorithm.

@aannleax aannleax added this to the Release 0.11.0 milestone Aug 4, 2026
@aannleax
aannleax requested a review from monsterkrampe August 4, 2026 10:41
@aannleax aannleax added this to nemo Aug 4, 2026
@github-project-automation github-project-automation Bot moved this to Todo in nemo Aug 4, 2026

@monsterkrampe monsterkrampe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. I did not verify how much faster this really is but I'm assuming that you tested that extensively :)

}

#[derive(Debug)]
#[allow(dead_code)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe we should remove the variants that we do not need anymore instead of marking this as dead_code?
At least if you came to the conclusion that Backward iteration is preferred anyway, then I'm ok with removing the others.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Its the order which coincides with the one which we were previosly implcitly using (at least on the relevant benchmarks). I would just keep the old ones around in case we want to revisit this later.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah I see... Then let's keep it as is.

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in nemo Aug 4, 2026
@aannleax
aannleax merged commit daff6df into main Aug 5, 2026
8 checks passed
@aannleax
aannleax deleted the performance/variable-orders branch August 5, 2026 09:57
@github-project-automation github-project-automation Bot moved this from In Progress to Done in nemo Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants