Open jaakkor2 opened 5 months ago
given that the regression was a bugfix, it seems unlikely to be fixable
I wouldn't say that. Bugfixes introduce perf regressions all the time but they can often be tweaked to keep the bug fixed while fixing the perf regression.
cc @N5N3
It seems impossible that the doubled allocation all comes from UnionAll unaliasing. So there might be some unexpected side effect. I will take a look when I have time, but not sure if there's a (quick) fix.
Tried to test this a bit locally, It turns out that 02f27c24929ab2561bcb21d3f58c1d313ae5d6e8 caused this "regression".
I have verified that type intersection does generate some result with free TypeVar
on v1.10.2 during Makie
's pre-compilation.
IIUC, this would change the result of inference and "simplified" the compiled signature, thus make loading faster.
From this perspective, this is not a regression of type intersection itself.
BTW, I also noticed that the inputs of jl_type_intersection_env_s
might contain free TypeVar
even during bootstrap.
And obviously, these free TypeVar
s do not come from type intersection. @vtjnash Is this expected?
@time using Makie # v0.21.2
Allocations increase quite a bit between Julia v1.10.2 and v1.10.3
I bisected this to
Last good
e44f1ab0082a7a4276e9384092b0f513cc991837
First bad
396f5d128cc48e6b3dc7526fb304cc349c1e8e1f
UnionAll
unaliasing bug caused by innervars. (#53553) 2.746628 seconds (3.61 M allocations: 393.176 MiB, 11.02% gc time, 1.51% compilation time: 41% of which was recompilation)Above happens on Windows and Linux, here is
versioninfo()
for Windows