Closed stev47 closed 3 months ago
Specializing convert(Result{Any, E}, x) for every type of x can incur substantial compilation overhead (not only on convert but also on Some). This change avoids specializing in case of explicit Any result type.
convert(Result{Any, E}, x)
x
convert
Some
Any
This is analogous to Julia Base where we have
convert(::Type{Any}, Core.@nospecialize x) = x
to avoid excessive specialization.
Superseded by #27
Specializing
convert(Result{Any, E}, x)
for every type ofx
can incur substantial compilation overhead (not only onconvert
but also onSome
). This change avoids specializing in case of explicitAny
result type.This is analogous to Julia Base where we have
to avoid excessive specialization.