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

Added Zero Copy article #93

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

akshatcoder-hash
Copy link

@akshatcoder-hash akshatcoder-hash commented Dec 4, 2023

New Addition: Added a tutorial to implement zero copy in anchor.

@akshatcoder-hash
Copy link
Author

could you please give a review? @acheroncrypto

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Hey, sorry for the late review!

Thank you for taking the time to write this but unfortunately zero copy is an advanced concept and this PR doesn't meet the standards of other parts of the book:

  • There is no explanation of memory layouts, alignments which is at the core of zero copy
  • There is no mention of possible pitfalls
  • The reasoning for the difference between normal and zero-copy version of the program is incorrect
  • Roughly half of the text is unnecessary analogies as if the advanced concept section is written for 5 year olds, for example:
    • Now for the cool part. We're going to tweak our program to use zero-copy. Imagine we're adding some fancy features to our locker...

    • We're checking the transaction fees and account changes - kind of like getting a receipt after you buy something....

    • When we used zero-copy, it cost a bit more in transaction fees. It's like paying extra for express delivery because you're getting a more complex service...

This would have to be completely rewritten in order to be suitable for the advanced section of the book.

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.

2 participants