On Friday, 7 February 2014 at 08:24:39 UTC, Walter Bright wrote:
[...]

An output range like this is a precursor to eliminating the excessive gc use by functions such as buildPath().

Somewhat OT, but I think you should pick some other function than buildPath() for your examples. It *used* to allocate east and west, yes, but that was a holdover from the old std.path.join(). I made some improvements to it about half a year ago, and now it virtually never allocates more than once(*).

Note, this is not an argument against ScopeBuffer, which may well be very useful. (I haven't looked properly at it yet.)

Lars


(*) Specifically, it will allocate more than once iff the list of path segments is an input range, and not a forward range, and the resulting path is longer than 255 characters.

Reply via email to