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

Chore: fix redundant equality check #10617

Merged
merged 1 commit into from Jul 18, 2018
Merged

Chore: fix redundant equality check #10617

merged 1 commit into from Jul 18, 2018

Conversation

mysticatea
Copy link
Member

What is the purpose of this pull request? (put an "X" next to item)

[X] Other, please explain: improve performance.

What changes did you make? (Give an overview)

This PR removes a redundant equality check which was found in #10612.

!util.isDeepStrictEqual(beforeAST, afterAST) || !lodash.isEqual(beforeAST, afterAST)

fixed to:

!lodash.isEqual(beforeAST, afterAST)

As the result, mocha --reporter progress tests/lib/rules/*.js in our codebase gets 15% faster.
lodash.isEqual looks faster than util.isDeepStrictEqual.
See details: https://gist.github.com/mysticatea/1045687663c17f2a9f1488e92d9b3038

Is there anything you'd like reviewers to focus on?

Nothing in particular.

@mysticatea mysticatea added the chore This change is not user-facing label Jul 18, 2018
@aladdin-add aladdin-add merged commit e596939 into master Jul 18, 2018
@aladdin-add aladdin-add deleted the fix-deep-equal branch July 18, 2018 12:58
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jan 15, 2019
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jan 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion chore This change is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants