Description
When running tools like jit-diff to compare the generated assembly its important that the JIT is able to output deterministic results. However, the current implementation of the GetCurrentProcessorId on CoreCLR checks for s_isProcessorNumberReallyFast which is assigned based on the return value of a ProcessorNumberSpeedCheck method.
Due to how the returned value is determined, it may cause fluctuation on which underlying implementation is used even on same machine. Because the GetCurrentProcessorId is inlined, its not as obvious what caused the codegen changes.
It was attempted to fix this using reflection in dotnet/jitutils#255 but was reverted in dotnet/jitutils#272 due to using reflection hole in the init-only static variables. The fix would require changes in framework code.