[swift-evolution] More fine tuning optimization to swift compiler

Muse M james.lei65 at gmail.com
Tue Aug 9 11:09:59 CDT 2016


-Oloop
Correction: it should be similar to GCC -funroll-loops
On other option if we have 1,000,000's loops or array, it's bad for one
core to handle 100% of the calculations and other cores are idle, the idea
could be optimize loops to share/split workload across all available CPU
cores.

-Ofunction
Is a dummy example for other example.

On Tue, Aug 9, 2016 at 11:21 PM, Félix Cloutier <felixcca at yahoo.ca> wrote:

> My understanding is that -Ounchecked removes integer overflow checks and
> array bound checks.
>
> What type of optimizations would -Oloop and -Ofunction do?
>
> Félix
>
> Le 7 août 2016 à 19:27:56, Muse M via swift-evolution <
> swift-evolution at swift.org> a écrit :
>
> I'm not sure if this is the right channel to discuss on optimization switch
>
> We are aware the 3 options:
> -O
> -Ofast
> -Ounchecked
>
> As we can see, we rarely use -Ounchecked for safety reason and there
> aren't much info on what are the tradeoff. if there are performance reason
> that will need to improve loop or maths optimization or allow developers to
> fine-tuning in various area, we could add more options to compiler.
>
> -OLoop (Optimize loop with safety)
> -OFunc (Optimize function calls)
> and so on.
>
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160810/ac796255/attachment.html>


More information about the swift-evolution mailing list