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

Improve InMemoryProvider getRange function from O(N^2) to O(N) #62

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

bhargeymehta
Copy link
Contributor

I noticed that in the getRange function we're doing a O(N^2) operation when constructing the results array. This time complexity arises because of doing a concat of 2 arrays instead of doing push operations on a single array.

Copy link
Contributor

@thomastay thomastay left a comment

Choose a reason for hiding this comment

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

Other than the comment, lgtm, but please wait for other folks on my team to take a look as well before merging

@thomastay
Copy link
Contributor

Can you also bump the patch version in the package.json

@bhargeymehta
Copy link
Contributor Author

@microsoft-github-policy-service agree company="Microsoft"

@bhargeymehta
Copy link
Contributor Author

Can you also bump the patch version in the package.json

done

@M1Les M1Les merged commit 6b70241 into microsoft:master Sep 9, 2024
2 checks passed
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.

4 participants