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

Merge nmirror to master - #1687

Merged
jkotas merged 7 commits into
masterfrom
nmirror
Aug 22, 2016
Merged

jkotas merged 7 commits into
masterfrom
nmirror

Conversation

@jkotas

@jkotas jkotas commented Aug 22, 2016

Copy link
Copy Markdown
Member

No description provided.

MichalStrehovsky and others added 6 commits August 20, 2016 09:05
UTC is unable to optimize away the initobj instruction and we're spending significant amount of time in RhpInitMultibyte zeroing out memory that will be assigned anyway.

[tfs-changeset: 1623410]
This no longer needs to be a runtime service since EEType structure is a binary contract.

Apart from deleting code (which is always nice), this has some other nice side effects:

* Small perf boost to various variant interface dispatch code paths (we can do less work by moving on quickly and codegen is free to do inlining)
* Avoid array allocation in type builder
* Unify code paths with CoreRT

[tfs-changeset: 1623411]
CR: JKotas, SergeyK, MorganB, DavidWr

Introduce a SyncTable for faster mapping from objects to associated Monitor synchronization (Lock) objects.  This implementation is faster than ConditionalWeakTable, which we have been using so far, for two reasons:

1)  We store the synchronization entry index in the object header, which avoids a hash table lookup.
2)  We store a strong reference to the synchronization object, which allows retrieving it much faster than going through a DependentHandle.

The design is described at the top of SyncTable.cs file.  Should we hit any issues, the new code may be disabled by setting the UseSyncTable property to false in System.Private.CoreLib.csproj.

I also commented out unused debugger support code, which is unfinished and may affect performance.

The lock performance improvement is 2.6 times for multi-file builds and 2.4 times for single-file builds as measured on x86.

[tfs-changeset: 1623451]
@jkotas

jkotas commented Aug 22, 2016

Copy link
Copy Markdown
Member Author

@dotnet-bot test Windows_NT Release please

@jkotas

jkotas commented Aug 22, 2016

Copy link
Copy Markdown
Member Author

@dotnet-bot test this please

@jkotas
jkotas merged commit 9344aea into master Aug 22, 2016
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.

4 participants