I ran a profiling session to pinpoint the key bottlenecks in the slicing algorithm, and found that graph composition accounts for 46% of the total compute time:

Can we optimize self._inst_graph = nx.compose(self._inst_graph, old_inst_graph) in pop_func?
Maybe by adding nodes and edges directly to the main instruction graph instead of relying to the merging facility of NetworkX? Fixing this bottleneck could potentially halve the slicing time. 🚀
This is the profile used, you can take a look at it yourself on speedscope.app.
Originally posted by @wizche in #200 (review)
I ran a profiling session to pinpoint the key bottlenecks in the slicing algorithm, and found that graph composition accounts for 46% of the total compute time:

Can we optimize
self._inst_graph = nx.compose(self._inst_graph, old_inst_graph)inpop_func?Maybe by adding nodes and edges directly to the main instruction graph instead of relying to the merging facility of NetworkX? Fixing this bottleneck could potentially halve the slicing time. 🚀
This is the profile used, you can take a look at it yourself on speedscope.app.
Originally posted by @wizche in #200 (review)