Is it possible bypass renormalize by check if simplify_types made any changes?
es-chow opened this issue · 2 comments
Is it possible to bypass renormalize() in step_simplify_types() by check the return value of simplify_types() make any changes to any node? If no changes made in simplify_types(), then renormalize() can be bypassed for better performance.
It's pretty much always going to change something in a realistic scenario (any use of a data structure that's not a tuple and any use of keyword arguments produce cruft that's removed here). Regardless, the goal is to eventually never run renormalize and update the information incrementally instead. It's already almost possible to remove this particular renormalize: only 8 tests don't pass if that line is removed. Presumably there's not a lot to do to fix simplify_types so that renormalize isn't needed at all.
Thanks for your comments. As renormalize is costly so if it can be removed it will be good for performance.