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

perf: use improved comparison algorithm in no-identical-tests rule #337

Merged
merged 1 commit into from
Jan 20, 2023

Conversation

marvinhagemeister
Copy link
Contributor

@marvinhagemeister marvinhagemeister commented Jan 20, 2023

Spent some time this evening profiling eslint on the eslint repo. Noticed that this rule seems to take a little longer than I would've guessed and spend a bit of time with @jviide improving the equality algorithm used for this rule. The result is that the changes in this PR make the rule ~10x faster.

Before After
453ms 46ms

This change reduces the time for this rule on the eslint repo down from
453ms to 46ms (= roughly 10x faster).
@marvinhagemeister
Copy link
Contributor Author

Alright it's ready now, fixed a typo in the commit message 🙈

@bmish bmish added the bug label Jan 20, 2023
Copy link
Member

@bmish bmish left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@bmish bmish changed the title perf: use improved comparison algorithm perf: use improved comparison algorithm in no-identical-tests rule Jan 20, 2023
@bmish bmish merged commit b4da20a into eslint-community:main Jan 20, 2023
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.

None yet

2 participants