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

Performance of predecessors, successors, and CFG computation #159

Open
willtebbutt opened this issue May 16, 2024 · 0 comments
Open

Performance of predecessors, successors, and CFG computation #159

willtebbutt opened this issue May 16, 2024 · 0 comments
Labels
enhancement (performance) Would reduce the time it takes to run some bit of the code good first issue Good for newcomers low priority

Comments

@willtebbutt
Copy link
Member

willtebbutt commented May 16, 2024

At present, the performance of compute_all_predecessors, compute_all_successors, and control_flow_graph are not bottlenecking anything (that I'm aware of), but there are clear redundancies in their implementations. For example:

  • compute_all_predecessors makes use of compute_all_successors in its implementation. Often these are both needed at the same time, which means that compute_all_successors is often run twice.
  • Both compute_all_predecessors and compute_all_successors create more allocations than is strictly necessary
  • Type-stability hasn't been checked
  • control_flow_graph makes use of both of these functions, and also has not really been optimised.

All this is to say that there is probably quite a lot that we could do to improve the performance of these functions, given some time.

If I ever notice that these are becoming an actual issue, I will remove the "low priority" tag, and prioritise solving this. In the mean time, this is probably a good place for someone to start working on the codebase.

@willtebbutt willtebbutt added good first issue Good for newcomers low priority enhancement (performance) Would reduce the time it takes to run some bit of the code labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement (performance) Would reduce the time it takes to run some bit of the code good first issue Good for newcomers low priority
Projects
None yet
Development

No branches or pull requests

1 participant