quickSort

Jonathan M Davis jmdavisProg at gmx.com
Wed Sep 14 03:12:26 PDT 2011


On Wednesday, September 14, 2011 06:09:52 bearophile wrote:
> %u:
> > i have qustion why filter can't return int[]
> 
> Because a lazy filter is handy, you often don't need a real array result, a
> lazy sequence is enough. A lazy sequence avoids the memory allocation of
> the output array. In D programs often the slowest parts are the memory
> allocations. On the other hand I have asked to add amap/afilter functions
> that return arrays. Andrei has not answered about this yet.

What would that gain you over passing the result of map or filter to 
std.array.array?

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list