<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 9, 2017, at 11:33 AM, Arnold Schwaighofer &lt;<a href="mailto:aschwaighofer@apple.com" class="">aschwaighofer@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Mark do you have suggestions for Dave?</div></div></blockquote><div><br class=""></div>I’d suggest something similar to what Pavel said. My usual first step is to look at the output of -Xfrontend -debug-constraints, which in cases like this tends to be so verbose that you have to kill the compile after a little while and a few megabytes of output and start reviewing that output. Key things to look for are “(assuming”, which is printed for each disjunction choice, and “(trying” which is printed before each attempt at trying a type binding.</div><div><br class=""></div><div>I took a quick look at this and based on the before/after output it looks like perhaps an optimization that picks favored overloads is no longer firing after your PR. As a result, rather than trying and successfully solving using integer operations for the arithmetic and stopping there, we exponentially attempt all combinations of all overloads of those operators. It would be very interesting to understand why that is since based on the description I would not expect your PR to have an impact on that.</div><div><br class=""></div><div>Mark</div><div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Aug 9, 2017, at 11:22 AM, David Zarzycki via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Any tips on how to debug performance regressions?<div class=""><br class=""></div><div class="">And as aside, if this test is critical enough to cause a revert, why isn’t it in the public repo?</div><div class=""><div class=""><br class=""></div></div></div></div></blockquote><div class=""><br class=""></div>This is part of a larger internal test.</div><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class=""><div class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Aug 9, 2017, at 14:04, Arnold Schwaighofer &lt;<a href="mailto:notifications@github.com" class="">notifications@github.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><p class="">Hi Dave,<br class="">
I have reverted this commit because it broke internal bots.</p>
<pre class=""><code class="">import Foundation
class P {
    var x : Int = 0
    var y : Int = 1
}

let dist : (P, P) -&gt; Double = {
  (p : P, s : P)  -&gt; Double in
    sqrt(Double((p.x-s.x)*(p.x-s.x) + (p.y-s.y)*(p.y-s.y)))
}
</code></pre><p class="">fails now with expression to complex.</p><p style="font-size:small;-webkit-text-size-adjust:none;color:#666;" class="">—<br class="">You are receiving this because you authored the thread.<br class="">Reply to this email directly, <a href="https://github.com/apple/swift/pull/11397#issuecomment-321334844" class="">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABBbbrS4O6QyW6_j4ksVB-fo2EPtmbWVks5sWfSigaJpZM4Oxfg-" class="">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABBbbpGHltnRTuyP1p8I4EpU_ZYh8rm2ks5sWfSigaJpZM4Oxfg-.gif" width="1" class=""></p>
<div itemscope="" itemtype="http://schema.org/EmailMessage" class="">
<div itemprop="action" itemscope="" itemtype="http://schema.org/ViewAction" class="">
  <link itemprop="url" href="https://github.com/apple/swift/pull/11397#issuecomment-321334844" class="">
  <meta itemprop="name" content="View Pull Request" class="">
</div>
<meta itemprop="description" content="View this Pull Request on GitHub" class="">
</div>

</div></blockquote></div><br class=""></div></div></div></div></div>_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-dev" class="">https://lists.swift.org/mailman/listinfo/swift-dev</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></body></html>