[phobos] Slicer

Jonathan M Davis jmdavisprog at gmail.com
Fri Aug 13 11:00:45 PDT 2010


On Friday, August 13, 2010 10:32:11 David Simcha wrote:
> I would agree if we were talking about big-O efficiency, or even a large
> constant overhead, but IMHO avoiding Slicer is a micro-optimization, not a
> macro-optimization.  Therefore, by default it should "just work" even if
> it's slightly inefficient and intervention should be required only if the
> programmer decides it needs to be optimized.

Well, if it's deemed that it's not a big difference, then I don't think that I 
really have a problem with it. It bugs me a bit still, but that doesn't mean 
that it's a bad idea. We definitely need std.algorithm to generally be efficient, 
but we also need it to be useable. So, if the cost in efficiency is small enough, 
and there really are a lot of ranges that have this problem, then Slicer 
probably should be used.

- Jonathan M Davis


More information about the phobos mailing list