This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
Merge changes from TFS - #1686
Merged
Merged
Conversation
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]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.