Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace NSMutableSet with NSHashTable when Appropriate #trivial #321

Merged
merged 3 commits into from
Jun 5, 2017

Conversation

Adlai-Holler
Copy link
Member

Resolves #312 and improves performance by replacing -hash and -isEqual: with pointer work.

@Adlai-Holler Adlai-Holler requested a review from appleguy May 30, 2017 19:04
@Adlai-Holler Adlai-Holler changed the title Replace NSMutableSet with NSHashTable when Appropriate Replace NSMutableSet with NSHashTable when Appropriate #trivial May 30, 2017
@@ -170,11 +170,12 @@ - (ASTraitCollection *)asyncTraitCollection

#pragma mark - Framework Private

- (nullable NSSet<id<ASLayoutElement>> *)findDuplicatedElementsInSubtree
#if DEBUG
Copy link
Member

Choose a reason for hiding this comment

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

Should this be AS_DEDUPE_LAYOUT_SPEC_TREE?

@@ -27,10 +27,12 @@ NS_ASSUME_NONNULL_BEGIN
NSMutableArray *_childrenArray;
}

#if DEBUG
Copy link
Member

Choose a reason for hiding this comment

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

Here too?

@Adlai-Holler Adlai-Holler merged commit a9837f2 into master Jun 5, 2017
@Adlai-Holler Adlai-Holler deleted the AHHashingEquality branch June 5, 2017 23:33
bernieperez pushed a commit to AtomTickets/Texture that referenced this pull request Apr 25, 2018
…ureGroup#321)

* Use NSHashTable to avoid needless -hash and -isEqual: calls

* Mark debug-only methods as such for clarity

* Address feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants