sort, .array and folding on immutable data (finding most common character in column of matrix)

Ali via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Dec 19 23:42:33 PST 2016


On Monday, 19 December 2016 at 14:09:47 UTC, pineapple wrote:
> This is a shortcoming of Phobos - here is a package of sorting 
> algorithms including some that do not require their inputs to 
> be mutable, random access, and/or finite:
>
> https://github.com/pineapplemachine/mach.d/tree/master/mach/range/sort

Oh nice! Will take a looksies

> It's worth noting that giving up eagerness, random access, etc. 
> often comes with a speed penalty. It may be more efficient just 
> to copy the lazy things into memory first and then sort 
> in-place, as you have been doing.

True dat!




More information about the Digitalmars-d-learn mailing list