dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.12k stars 4.7k forks source link

Consider raising limit for expanding switch tables into if/else searches #11593

Open jkotas opened 5 years ago

jkotas commented 5 years ago

More details / prototype in https://github.com/dotnet/coreclr/pull/13574

category:cq theme:basic-cq skill-level:intermediate cost:medium

mikedn commented 5 years ago

It might be good to discuss this with the Roslyn team as well, they do their own thing and that may interfere with JIT's decisions.

AndyAyersMS commented 5 years ago

Seems worth doing ... also note there is a whole repertoire of switch expansions that native compilers do that the jit doesn't even contemplate.

We could use better motivating and benchmarking examples. We have dotnet/runtime#8573 but it would be good to see some that are not in artificial benchmark code.