
Lazy Resolution: Resolve Once, Dispatch Forever
Self-patching function pointers for zero-cost C++ dispatch after first call. Assembly analysis, 38ns/100M-call benchmarks, thread safety, and how OpenJDK uses this pattern for GC barrier resolution.

Self-patching function pointers for zero-cost C++ dispatch after first call. Assembly analysis, 38ns/100M-call benchmarks, thread safety, and how OpenJDK uses this pattern for GC barrier resolution.

Virtual vs CRTP vs std::variant vs function pointer: which C++ dispatch mechanism is fastest? Benchmarks, generated assembly, compile times, and a decision framework for the strategy pattern in performance-critical code.