Skip to content

Avoid linear lookups in a Program#659

Merged
fpoli merged 1 commit into
masterfrom
optimize-lookups
Mar 10, 2023
Merged

Avoid linear lookups in a Program#659
fpoli merged 1 commit into
masterfrom
optimize-lookups

Conversation

@fpoli

@fpoli fpoli commented Mar 10, 2023

Copy link
Copy Markdown
Member

This PR introduces several lazy maps that index the program items by name.

Fixes #657.

@fpoli fpoli force-pushed the optimize-lookups branch 5 times, most recently from bee909f to bd76ebb Compare March 10, 2023 13:10
@fpoli fpoli force-pushed the optimize-lookups branch from bd76ebb to 50f6c0a Compare March 10, 2023 13:10
@fpoli fpoli requested a review from marcoeilers March 10, 2023 13:19
@fpoli fpoli changed the title Avoid linear lookups in a Program (fixes #657) Avoid linear lookups in a Program Mar 10, 2023

@marcoeilers marcoeilers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM (assuming toMap actually gives you a HashMap and not a ListMap that doesn't perform any better than the current linear traversal)

@fpoli fpoli merged commit e66c2a0 into master Mar 10, 2023
@fpoli fpoli deleted the optimize-lookups branch March 10, 2023 15:01
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.

Avoid linear scans in Program.find* methods

2 participants