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 #23381, Use sink and lent to avoid Future[object] making a copy #23389

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Fix #23381, Use sink and lent to avoid Future[object] making a copy #23389

merged 1 commit into from
Mar 14, 2024

Conversation

haoyu234
Copy link
Contributor

fix #23381

As for the read function, the original plan was to use lent for annotation, but after my experiments, it still produced copies, so I had to move it out.

Now the read function cannot be called repeatedly

@haoyu234 haoyu234 changed the title Fix #23381, Use sink and move to avoid Future[object] making a copy Fix #23381, Use sink and lent to avoid Future[object] making a copy Mar 11, 2024
@haoyu234 haoyu234 closed this Mar 12, 2024
@haoyu234 haoyu234 reopened this Mar 12, 2024
@haoyu234 haoyu234 requested review from Araq and arnetheduck March 12, 2024 04:58
@Araq
Copy link
Member

Araq commented Mar 14, 2024

Awesome work! Thank you!

@Araq Araq merged commit 51837e8 into nim-lang:devel Mar 14, 2024
32 checks passed
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from 51837e8

Hint: mm: orc; opt: speed; options: -d:release
178258 lines; 7.996s; 768.43MiB peakmem

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.

Future[object] aways copy data
3 participants