quickSort

bearophile bearophileHUGS at lycos.com
Wed Sep 14 03:09:52 PDT 2011


%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.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list