Skip to content

Convert s_charactersRequiringQuotes in Completion Completers to SearchValues<char> for more efficient char searching #24879

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

Merged
merged 4 commits into from
Jan 28, 2025

Conversation

ArmaanMcleod
Copy link
Contributor

@ArmaanMcleod ArmaanMcleod commented Jan 27, 2025

PR Summary

Converted s_charactersRequiringQuotes to SearchValues<char> to do optimized char searching.

I have not included benchmarks but given this was introduced in .NET 8 and provides more readability than IndexOfAny anyways. It will also have performance benefits if we add more characters in the future and saves from having to optimize this later.

Follow up from discussion with @iSazonov in #24839

PR Context

PR Checklist

@ArmaanMcleod ArmaanMcleod changed the title Convert s_charactersRequiringQuotes in Completion Completers to SearchValues<char> for more efficient char searching Convert s_charactersRequiringQuotes in Completion Completers to SearchValues<char> for more efficient char searching Jan 27, 2025
@iSazonov

This comment was marked as outdated.

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Jan 27, 2025

This comment was marked as outdated.

@iSazonov

This comment was marked as outdated.

This comment was marked as outdated.

@iSazonov
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@iSazonov iSazonov self-assigned this Jan 28, 2025
@iSazonov iSazonov merged commit c1abc73 into PowerShell:master Jan 28, 2025
34 of 36 checks passed
Copy link
Contributor

microsoft-github-policy-service bot commented Jan 28, 2025

📣 Hey @ArmaanMcleod, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy