4 - In ReviewArea-CompilersCode Gen QualityConcept-Design Debthelp wanted
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (Avg merge 6d 17h) (256 merged PRs in 30d)
Description
Codegen of System.Nullable is null check is poor
void PoorCodegen(in int? v)
{
if (v is null)
return;
}
void GoodCodegen(in int? v)
{
if (!v.HasValue)
return;
}
void GoodCodegen2(in int? v)
{
if (v == null)
return;
}
In the pattern matching case there suddenly is a copy.