Hi Bruno, On 4/11/24 12:51 PM, Bruno Haible wrote: > The func_transitive_closure function in the shell implementation can take > a lot of time. So I wondered whether in the Python implementation, there > is room for speedup at this place as well. And indeed, there is.
Nice work. I noticed this too, which was my reasoning for wanting to change GLModuleSystem to use sets to store the modules instead of lists. Doing so would break the sorting required for the test cases though. All modules are sorted except for the dummy module which is placed at the end. I ended up just changing the avoided modules since it was easy and every module + it's dependencies are checked: while inmodules: inmodules_this_round = inmodules inmodules = [] # Accumulator, queue for next round for module in inmodules_this_round: if module not in self.avoids: # Important line here. outmodules.append(module) Collin