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

Reduce copying #111

Open
lgrahl opened this issue Oct 8, 2018 · 2 comments
Open

Reduce copying #111

lgrahl opened this issue Oct 8, 2018 · 2 comments

Comments

@lgrahl
Copy link
Member

lgrahl commented Oct 8, 2018

There's a lot of unnecessary byte copying in the code. I would like to change this in a way where the application has to expect side effects if it modifies byte views passed to a function or method that stores this data. The docstring always has to explicitly state if it stores a byte view and for how long. Because of this change, a major release would need to be done.

However, I believe it is the correct approach compared to the other way around (always copy) because that would make it impossible to write an efficient library.

@dbrgn
Copy link
Member

dbrgn commented Oct 15, 2018

The docstring always has to explicitly state if it stores a byte view and for how long.

Ownership and lifetime tracking cough

@lgrahl
Copy link
Member Author

lgrahl commented Oct 15, 2018

Feel free to extend TypeScript with that feature. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants