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
The generated code might possibly be improved by calling GetType() on the input and including a sequence of tests against the type desired (when consecutive tests are for sealed types).
We would have to measure whether we actually get any improvement before committing to such an optimization.
The text was updated successfully, but these errors were encountered:
Instead of the optimization discussed, we are planning to provide an API along the lines of https://github.com/dotnet/corefx/issues/36132 and use that in the compiler for efficient dispatch on type.
We occasionally use a "typeswitch-style" switch in Roslyn. For example
The generated code might possibly be improved by calling
GetType()
on the input and including a sequence of tests against the type desired (when consecutive tests are for sealed types).We would have to measure whether we actually get any improvement before committing to such an optimization.
The text was updated successfully, but these errors were encountered: