Replace DoubleUtil.IsNaN with double.IsNaN #4338
Labels
Enhancement Requested
Product code improvement that does NOT require public API changes/additions
Performance
Performance related issue
BCL's double.IsNaN got faster long ago. In .NET Core it is a single instruction.
The usage of DoubleUti.IsNaN should be replaced by double.IsNaN.
Codegen difference
Benchmarks
Results:
BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
Intel Core i7-8809G CPU 3.10GHz (Kaby Lake G), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=6.0.100-preview.2.21155.3
[Host] : .NET Core 5.0.4 (CoreCLR 5.0.421.11614, CoreFX 5.0.421.11614), X64 RyuJIT
.NET 4.8 : .NET Framework 4.8 (4.8.4341.0), X64 RyuJIT
.NET Core 5.0 : .NET Core 5.0.4 (CoreCLR 5.0.421.11614, CoreFX 5.0.421.11614), X64 RyuJIT
The text was updated successfully, but these errors were encountered: