Dictionary lookup vs switch vs if performance in C#
Lets say you want to execute a specific logging function based on a log level. Amongst others you could use a switch- or if statements or use a generic dictionary containing the functions to call.…