This PR adds another greedy DAG extractor which improves the performance of calculating a term's cost.
It does this by sharing subterms in a global DAG, and exiting early when doing set unions.
cumulative time for bottom-up: 2474ms
cumulative time for global-greedy-dag: 4239ms
cumulative time for greedy-dag: 35011ms
cumulative dag cost for global-greedy-dag: 76907
cumulative dag cost for greedy-dag: 76907
This PR adds another greedy DAG extractor which improves the performance of calculating a term's cost. It does this by sharing subterms in a global DAG, and exiting early when doing set unions.