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

fix: faster shallowEqual 30% performance improvement & __DEV__ Just make a judgment once #28776

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jeryqwq
Copy link

@jeryqwq jeryqwq commented Apr 7, 2024

Remove unnecessary If statement & faster shallowEqual. https://jsben.ch/MQb2y
image

@facebook-github-bot
Copy link

Hi @jeryqwq!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@react-sizebot
Copy link

react-sizebot commented Apr 7, 2024

Comparing: f86afca...a114460

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 168.90 kB 168.85 kB = 52.69 kB 52.68 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 170.71 kB 170.66 kB = 53.24 kB 53.23 kB
facebook-www/ReactDOM-prod.classic.js = 590.23 kB 590.14 kB = 103.62 kB 103.60 kB
facebook-www/ReactDOM-prod.modern.js = 566.56 kB 566.48 kB = 99.57 kB 99.56 kB
test_utils/ReactAllWarnings.js Deleted 64.04 kB 0.00 kB Deleted 16.02 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 64.04 kB 0.00 kB Deleted 16.02 kB 0.00 kB

Generated by 🚫 dangerJS against a114460

@jeryqwq jeryqwq changed the title fix: __DEV__ Just make a judgment once fix: __DEV__ Just make a judgment once & faster shallowEqual more 30% Apr 7, 2024
@jeryqwq jeryqwq changed the title fix: __DEV__ Just make a judgment once & faster shallowEqual more 30% fix: faster shallowEqual more 30% & __DEV__ Just make a judgment once Apr 7, 2024
@jeryqwq jeryqwq changed the title fix: faster shallowEqual more 30% & __DEV__ Just make a judgment once fix: faster shallowEqual 30% performance improvement & __DEV__ Just make a judgment once Apr 7, 2024
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.

None yet

3 participants