if self.current_level[0] != self.search_index.level:
but self.current_level[0] is always, e.g., [4] if the level is 4, while self.search_index.level = 4. This causes the check to always fail and the level to always be recomputed. This doesn't harm correctness but harms efficiency.
We should have a special check for the zero-th element, or raise the partitions of n to an interface with a "level"-like function.
The superabundant search strategy checks
but
self.current_level[0]
is always, e.g.,[4]
if the level is 4, whileself.search_index.level = 4
. This causes the check to always fail and the level to always be recomputed. This doesn't harm correctness but harms efficiency.We should have a special check for the zero-th element, or raise the partitions of n to an interface with a "level"-like function.