uint num_levels() const;

During post-order traversal, a node is pruned from its parent after it gets visited. This is the so called operation PruneNode. Prune-ranges represent groups of nodes that can be pruned independent from one another and, therefore, in parallel. Conceptually prune-ranges are similar to levels of (parallel) VisitNode operations (see also num_levels()). In a balanced tree the number of levels is in the order of O(log2(N)), where N is the number of tips in the tree and, therefore, parallelization can be beneficial. In a strongly unbalanced tree, the number of levels is in the order of O(N), and the parallelization of the VisitNode operation cannot improve the speed.

See also