News for hackers. Stuff that matters.
Re:Don’t assume that safety comes for free: a Swift case study by int_19h on Tuesday December 06, 2016 @02:49PM (#13117687)
> Using "reduce" rather than a loop also has ~2x overhead ... Neither is really surprising

I disagree. It all depends on where you're coming from, and what your expectations are. In C++, using reduce (std::accumulate) with a lambda is normally as fast as using a loop, because the compiler will inline the lambda into accumulate, and then accumulate into the calling function, producing the same exact loop.

There are no comments on this comment yet.