CRT Pow function has bad performance on Windows #10798
Open
Description
opened on Jul 30, 2018
During benchmarking AoS/SoA ray-tracer dotnet/coreclr#18839, we found that the Vector3
benchmark (RayTracer) is much slower on Windows than Linux.
Execution time | Windows | Linux |
---|---|---|
Baseline (RayTracer ) | 6.00s | 4.13s |
PacketTracer | 1.20s | 1.35s |
Performance Gains | 5.00x | 3.06x |
According to VTune analysis, this gap is caused by the CRT math library, which RayTracer uses Math.Pow
at https://github.com/dotnet/coreclr/blob/master/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Raytracer.cs#L153
Windows
Linux
On the left side (AoS means RayTracer), we can see ucrtbase.dll
on Windows has much more time consuming and instruction retired than libm-2.23.so
on Linux.
The data is collected on Core i9 + VS2017, but Core i7+ VS2015 has the same performance gap.
Activity