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

use object for GraphQLWrappedResult instead of tuple #4265

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

yaacovCR
Copy link
Contributor

for readability. benchmarks suggest similar or even better performance

image

for readability. benchmarks suggest similar performance
@yaacovCR yaacovCR requested a review from a team as a code owner October 29, 2024 10:36
@yaacovCR yaacovCR changed the title use object instead of tuple use object for GraphQLWrappedResult instead of tuple Oct 29, 2024
Copy link

netlify bot commented Oct 29, 2024

Deploy Preview for compassionate-pike-271cb3 ready!

Name Link
🔨 Latest commit 0aaf0d9
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/6720baca1ee52d00089e9710
😎 Deploy Preview https://deploy-preview-4265--compassionate-pike-271cb3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@yaacovCR yaacovCR added the PR: polish 💅 PR doesn't change public API or any observed behaviour label Oct 29, 2024
Copy link

Hi @yaacovCR, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions run-benchmark - Run benchmark comparing base and merge commits for this PR
  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

@yaacovCR yaacovCR requested review from JoviDeCroock and robrichard and removed request for a team October 29, 2024 10:37
Copy link
Member

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

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

The reason for this performance improvement is that multi-value-shape tuples and especially holey tuples are a deopt.

  • First deopt --> the Array is not mono-value i.e. we can have T and nested arrays as well as an explicit undefined
  • Second deopt --> the second array can be an explicit undefined (a hole)

@yaacovCR yaacovCR merged commit d59c725 into main Oct 29, 2024
36 checks passed
@yaacovCR yaacovCR deleted the use-object-instead-of-tuple branch October 29, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: polish 💅 PR doesn't change public API or any observed behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants