[swift-users] Why are Swift Loops slow?
Andrew Trick
atrick at apple.com
Wed Oct 12 17:24:35 CDT 2016
> On Oct 12, 2016, at 9:05 AM, Joe Groff via swift-users <swift-users at swift.org> wrote:
>
> It looks like LLVM does not recognize the overflow traps Swift emits on arithmetic operations as dead code, so that prevents it from completely eliminating the Swift loop. That's a bug worth fixing in Swift, but unlikely to make a major difference in real, non-dead code.
The traps aren’t dead if they are reachable. Eventually we will teach LLVM about less-strict trap semantics so they can be speculated and reordered. But for now we can do that sort of thing in SIL in the most important cases.
-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20161012/da15f454/attachment.html>
More information about the swift-users
mailing list