How to build a static dispatch table of instance methods in C#
Replace an if/else chain of instance-method calls with a lookup table built once: give the delegate an explicit 'self' parameter, fill a static FrozenDictionary with static lambdas or open instance delegates from MethodInfo.CreateDelegate, and pass 'this' at call time. Benchmarked on .NET 11 against if/else, switch, Dictionary, MethodInfo.Invoke and per-instance tables, and checked under Native AOT.