Program to continuously allocate memory for testing purposes

I agree with you. Perhaps somewhere combinators can make the code more readable, but not in this case. Although it looks funny. I would rather like to know if this negatively affects the memory used or other technical aspects?

No, not in general. Performance depends on what operations you perform, whether chained like this or not.

Yep, I saw a discourse in the "internals" about adding Vec::sorted() into std. People mention inefficient itertools.sorted, which consumes iterator and reallocates the memory, if I understand they correctly.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.