Skip to content

observable) replace objectLookup with canonical Map#171

Merged
brianmhunt merged 2 commits into
mainfrom
170-O-1-lookup
May 11, 2022
Merged

observable) replace objectLookup with canonical Map#171
brianmhunt merged 2 commits into
mainfrom
170-O-1-lookup

Conversation

@brianmhunt

Copy link
Copy Markdown
Member

Change the custom, archaic objectLookup type to a Map. This can have dramatic performance increase as it changes the computational complexity of toJS from O(n²) to O(n) over the object/array size.

Closes #170

@brianmhunt

Copy link
Copy Markdown
Member Author

@danieldickison @mbest I'd be grateful for a sanity review/approval here, if you have a moment.

@brianmhunt
brianmhunt merged commit 41ce562 into main May 11, 2022
@brianmhunt
brianmhunt deleted the 170-O-1-lookup branch May 11, 2022 13:42

@danieldickison danieldickison left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Bit late (sorry) but this also looks good to me.

@brianmhunt

Copy link
Copy Markdown
Member Author

@felipesantoz Tagging for visibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change mappingHelpers objectLookup from an O(n) array to O(1) Map

3 participants