You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ref #15177 (comment)
On my laptop, the following code takes < 0.02s on 0.4 and > 40s on master.
functionf(m)
for i innames(m)
v =m.(i)
isa(v, Function) &&string(v)
endend@timef(Base)
According to the profiling result, it spends most of the time in inferencing and compiling string (or print_to_string) even though the result of the compilation isn't any useful since rerunning f(Base) takes roughly the same time on 0.4....
As Stefan pointed out, the heuristic of not specializing on what we don't call should solve this issue but somehow it is not triggerred in this case.
@jrevels for performance benchmark. In additional to the reduced case above, the first half of genstdlib.jl script before #15177 should be a good candidate too.
@JeffBezanson the problem here is MAX_UNSPECIALIZED_CONFLICTS, so even though the logic for "this argument is or is not being called in this function" is correct, it gives up on unspecializing the cache entry
Ref #15177 (comment)
On my laptop, the following code takes
< 0.02s
on 0.4 and> 40s
on master.According to the profiling result, it spends most of the time in inferencing and compiling
string
(orprint_to_string
) even though the result of the compilation isn't any useful since rerunningf(Base)
takes roughly the same time on 0.4....As Stefan pointed out, the heuristic of not specializing on what we don't call should solve this issue but somehow it is not triggerred in this case.
@jrevels for performance benchmark. In additional to the reduced case above, the first half of
genstdlib.jl
script before #15177 should be a good candidate too.c.c. @JeffBezanson
The text was updated successfully, but these errors were encountered: