Irritated by the fact that in #rustlang the slice `sort_by` mutates the contents rather than returning a sorted slice. This means any time I need sorting in a pipeline of data, this makes me stop and use a new variable.
-
-
Replying to @KevinHoffman
Because if it wants to go fast it needs to be inplace, otherwise it needs to allocate to return a new slice which is a performance hit. I'm not sure why you need a new variable? If it's a pipeline then you won't need the prior version of the data correct?
2 replies 0 retweets 0 likes -
Replying to @mgattozzi
I need a new variable because I have to stop and collect the stream (which I understand). I guess I just want to be able to sort a collected stream like: let x = http://f.map (...).filter(...).zip(...).collect().sort() , but sort returns () not a vec
2 replies 0 retweets 0 likes -
Replying to @KevinHoffman
Ohh I see what you mean. Yeah not fun. But if you collect and do an in place sort then you can still use x after doing x.sort();
2 replies 0 retweets 0 likes
I think itertools may have a sort for this case?
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.