-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
JitUntriagedCLR JIT issues needing additional triageCLR JIT issues needing additional triagearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedoptimizationtenet-performancePerformance related issuePerformance related issue
Milestone
Description
As a condition of a while it doesn't elide the check
while ((uint)i >= (uint)entries.Length)
{
// not elided
if (entries[i].hashCode == hashCode && comparer.Equals(key, entries[i].key))
{Changing it to an if + break does elide the check
do
{
if ((uint)i >= (uint)entries.Length)
{
break;
}
// elided
if (entries[i].hashCode == hashCode && comparer.Equals(key, entries[i].key))
{category:cq
theme:bounds-checks
skill-level:expert
cost:small
HFadeel, redknightlois, ilexp, airbreather, pentp and 5 more
Metadata
Metadata
Assignees
Labels
JitUntriagedCLR JIT issues needing additional triageCLR JIT issues needing additional triagearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedoptimizationtenet-performancePerformance related issuePerformance related issue