Skip to content

Improve performance of getMatchRankings by replacing 4 string compari…#158

Merged
kentcdodds merged 1 commit into
kentcdodds:mainfrom
chcederquist:main
May 22, 2025
Merged

Improve performance of getMatchRankings by replacing 4 string compari…#158
kentcdodds merged 1 commit into
kentcdodds:mainfrom
chcederquist:main

Conversation

@chcederquist

Copy link
Copy Markdown
Contributor

…sons with a single indexOf

What: Reducing running time by avoiding redundant string comparisons

Why: Improves performance of getMatchRanking

How: Using a single indexOf-call, and reasoning from that

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

@kentcdodds kentcdodds left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Good call. Thanks!

@kentcdodds kentcdodds merged commit 025e4cf into kentcdodds:main May 22, 2025
4 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 8.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants