Am Wed, 11 Dec 2013 08:29:38 +0100 schrieb "Frustrated" <c1514...@drdrb.com>:
> > Has anyone done any work on comparing the performance of ranges > vs using direct straightforward code(optimized in the sense of > the way ranges work but by hand). > > e.g., How does filter compare to a simple loop over the elements > and comparing it. How does a a chain of UFCS compare to doing the > same in a simple loop. Just use hand written loops if you are worried about this or benchmark on a per case basis. There is no one fits all answer. Not all code executes a million times per second though, so feel free to use them now and then where concise code is regarded higher than premature optimization. ;) -- Marco