dotnet / dotnet/machinelearning
CpuMath Enhancement: Make bound checking of loops in hardware intrinsics more efficient
Open
area-Native
enhancement
help wanted
needs-author-action
Priority:2
- Dominant language
- C#
- Stars
- 9.4k
- Forks
- 2k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 11
Description
Style changes needed to solve part of https://github.com/dotnet/machinelearning/issues/823
## Details
- In `src\Microsoft.ML.CpuMath\SseIntrinsics.cs` and `src\Microsoft.ML.CpuMath\AvxIntrinsics.cs`, changing `while (pDstCurrent + 4 <= pDstEnd)` for the loop bound checking into `while (pDstCurrent <= pDstEnd - 4)` to save an instruction (ref: https://github.com/dotnet/machinelearning/pull/668#issuecomment-412121893)
- It may probably be a CoreCLR issue
Contributor guide
Assessment
This issue has not been assessed yet.