<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On 7 Sep 2016, at 15:11, louislepegue via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:<br class=""><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><font size="+1" style="font-family: Helvetica; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">let simpleTest = Float(abs(11 - -3) + abs(4.5 - -4))&nbsp; //!<br class="">print ("simpleTest:&nbsp; \(Simpletest)")<br class=""></font><font size="+1" style="font-family: Helvetica; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class=""><br class=""></font></div></blockquote></div><br class=""><div class=""><div class="">Aside from the fact that the case-sensitivity of simpleTest is important, the delay is in the compilation of this script rather than the runtime performance of the script. You can compile it with swiftc (which takes around 20s) but then when running it the performance is fine.</div><div class=""><br class=""></div><div class="">It's certainly an interesting compiler issue, probably to do with the type analysis rather than the complexity of the abs function or the Float cast directly. It's still worth raising a bug at&nbsp;<a href="https://bugs.swift.org" class="">https://bugs.swift.org</a>&nbsp;with the snippet though.</div><div class=""><br class=""></div><div class="">Alex</div></div></body></html>