Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Optimize IntPtr/UIntPtr.Zero - #1306

Merged
jkotas merged 1 commit into
dotnet:masterfrom
jkotas:intptr-zero
May 20, 2016
Merged

jkotas merged 1 commit into
dotnet:masterfrom
jkotas:intptr-zero

Conversation

@jkotas

@jkotas jkotas commented May 20, 2016

Copy link
Copy Markdown
Member

No description provided.

{
helperId = ReadyToRunHelperId.GetNonGCStaticBase;
var owningType = field.OwningType;
if ((field.Context.IsWellKnownType(owningType, WellKnownType.IntPtr) ||

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at owningType.Category might be more efficient, but this is unlikely to be a problem either way.

@MichalStrehovsky

Copy link
Copy Markdown
Member

👍

@jkotas
jkotas merged commit d3aaa99 into dotnet:master May 20, 2016
@jkotas
jkotas deleted the intptr-zero branch May 20, 2016 14:38
MichalStrehovsky added a commit to MichalStrehovsky/corert that referenced this pull request May 20, 2016
I originally wrote the code this way because comparing with IntPtr.Zero
was slow. dotnet#1306 should have fixed that.
MichalStrehovsky added a commit that referenced this pull request May 20, 2016
I originally wrote the code this way because comparing with IntPtr.Zero
was slow. #1306 should have fixed that.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants