-
Notifications
You must be signed in to change notification settings - Fork 87
Optimize MCP assoc lists #572
Copy link
Copy link
Closed
Labels
cleanupRefactoring, clean-upRefactoring, clean-upperformanceAnalysis time, memory usageAnalysis time, memory usage
Milestone
Description
MCP extensively uses assoc lists to represent a dynamic product of analyses (i.e. their domain elements, contexts, etc). Manipulating these involves lots of assoc calls to look up corresponding analysis values in other lists. From profiling I have noticed this have a nontrivial impact where List.assoc takes ~10% of Goblint's total runtime!
Assoc lists are famously not performance-oriented, so it makes sense to improve this. Currently I see two possibilities:
- Replace assoc lists with
Map. - Ensure well-defined and consistent order of elements (e.g. sorted by analysis index) in the assoc lists such that operations can just zip two/three of those lists together. This would allow manipulating corresponding elements pairwise without having to do
assoccalls.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cleanupRefactoring, clean-upRefactoring, clean-upperformanceAnalysis time, memory usageAnalysis time, memory usage