[swift-evolution] [Pitch] Retiring `where` from for-in loops

Brent Royal-Gordon brent at architechies.com
Mon Jun 13 14:59:45 CDT 2016


>> See the benchmarks me and Erica have posted here a few days back - even with the lazy accessor, if you decided to use filter(_:), you lost 10+% of performance. Correct way to do this without `where` and without performance penalization is to use guard within the for-in loop.
> 
> 10% on a microbenchmark repeater 4000000 times is hardly a justification for going on way or the other.

You're right: 10% on a microbenchmark isn't the best possible data. If you have better data, we are all ears.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list