Today, calls to GuidGenerator.GetIID are optimized into constant or partially pre-calculated values after compilation with IL editing. The C# compiler has an experimental feature to intercept calls by callsite and replace them with calls to other methods. This feature is in preview, but is used by various source generators for ASP.NET Core and Microsoft.Extensions projects. It may be worth moving IIDOptimizer to be a source-generator that emits the pre-calculated code to avoid getting into situations where it emits code that uses non-optimal patterns (#1340)