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

Balance term structure for parallel composition operator. #1792

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jkeiren
Copy link
Collaborator

@jkeiren jkeiren commented Nov 12, 2024

Before applying alphabet reductions, in this commit we balance the term structure for parallel composition. When having p1 || ... || pn, this results in a term structure of depth log_2(n), instead of n.

I have observed 10% speed increases in mcrl22lps on some examples due to this change.

If desired, we could make this an option of mcrl22lps, similar to --balance-summands.

Before applying alphabet reductions, in this commit we balance the term structure for parallel composition. When having p1 || ... || pn, this results in a term structure of depth log_2(n), instead of n.

I have observed 10% speed increases in mcrl22lps on some examples due to this change.
Alphabet reductions performed repeated linear searches in the vector of equations to find a process identifier. In the worst case, every left-hand-side of an equation was searched for at least once.

We now, instead, precompute a map of process identifier to equations, so the cost of lookup becomes O(log(n)) instead of O(n) where n is the number of equations.

In my example with 413 equation, this leads to a 15% performance improvement.
@mlaveaux mlaveaux self-assigned this Nov 14, 2024
@mlaveaux mlaveaux added the enhancement Something can be improved label Nov 14, 2024
@jkeiren jkeiren marked this pull request as draft November 19, 2024 15:10
We probably do not want to enable this by default, as it can change the order in which processes are combined.

Inconvenient combinations of processes may lead to poor performance, especially when alphabet reductions are not enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants