Join GitHub today
type_cases: always propagate #1747
Looking at the code, the following can be deduced:
However, given the first condition, the calls to generalize that are avoided should actually be noops even if we ran them.
As it turns out, the same speed-up can be achieved by a more straightforward change: passing the arguments in the correct order when calling
For benchmarking I reused the same test case as given in the MPR, that is:
I timed the compilation of that file (and a slightly bigger one where I have 8k methods instead of 2k) a few times, with various compilers, here are the results:
garrigue left a comment
Well spotted. I didn't expect the cost to come from this single call to unify_var.
Also, looking more carefully at