-
Notifications
You must be signed in to change notification settings - Fork 658
Replace LinkedHashSet<T> with OrderedHashSet<T> #1272
Copy link
Copy link
Open
Labels
good-first-issueGood for newcomersGood for newcomersis:enhancementNew feature or requestNew feature or requestnotes:performance-improvementContains a performance improvementContains a performance improvementup-for-grabsThis issue is open to be worked on by anyoneThis issue is open to be worked on by anyone
Milestone
Metadata
Metadata
Assignees
Labels
good-first-issueGood for newcomersGood for newcomersis:enhancementNew feature or requestNew feature or requestnotes:performance-improvementContains a performance improvementContains a performance improvementup-for-grabsThis issue is open to be worked on by anyoneThis issue is open to be worked on by anyone
Type
Fields
Give feedbackNo fields configured for Task.
Is there an existing issue for this?
Task description
J2N 2.2.0-alpha-0042 added an
OrderedHashSet<T>that is very similar to the backport of the .NET 9OrderedDictionary<TKey, TValue>class, which is a more efficient implementation than J2N'sLinkedHashSet<T>. It should be a drop-in replacement, but there may be some minor fixup work to do to map to the new API.The task is to swap all usage of
LinkedHashSet<T>withOrderedHashSet<T>and to ensure that all tests pass.Please use the alias
J2N.OrderedHashSet<T>in case Microsoft adds support for this in the future.Each place where we swap in the new implementation should have the following comment:
// LUCENENET specific: OrderedHashSet<T> is a replacement for LinkedHashSet<E> in the JDKWhile optional, there is a related issue here: NightOwl888/ICU4N#126