[swift-evolution] [Review] SE-0007 Remove C-style for-loops with conditions and incrementers

Paul Cantrell cantrell at pobox.com
Fri Dec 11 09:30:35 CST 2015


>> With that tweak, the zip+stride approach actually clocks in faster than the C-style for. Yes, you read that right: faster.
> 
> One problem: zip+stride suffers tremendously at -Onone. One test looked like this (normalized elapsed time; smaller is better)

Do we really care about -Onone performance? Doesn’t that flag specifically mean “I don’t care about performance?”

All kinds of Swift code incurs massive performance penalties with -Onone, but the core team hasn’t let that hold back the language. See the “results” section here, for example: http://www.jessesquires.com/apples-to-apples-part-two/

IMO, we should design languages around performance concerns only when a construct has an _inherent_ performance limitation. I’d say these timings results show pretty clearly that no such inherent limitation exists here.

Cheers, P


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151211/c54a763f/attachment.html>


More information about the swift-evolution mailing list