<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><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><div class="">I don’t have any issue with moving it to a&nbsp;-unsafe-remove-checks flag, but the idea of removing support for it altogether causes some alarm.<br class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">As a quick data point, I ran my game engine/project with the same workload for a few minutes with “Disable Safety Checks” on and off in Xcode, with no other flags changed.&nbsp;<div class=""><br class=""></div><div class="">The average CPU usage (not the best metric but the easiest to acquire) on my iMac (4.0GHz i7) hovered between ~78-82% across all cores with safety checks off, while it averaged between ~88-92% with safety checks on. That’s a fairly significant performance deficit. I’ve attached screenshots below.</div><div class=""><br class=""></div><div class="">It’s worth noting that I’d expect that gap to be even larger if I hadn’t manually disabled safety checks (e.g. using &amp;+ and &amp;*) in a number of places to make debug mode usable.</div><div class=""><br class=""></div><div class="">With “Disable Safety Checks” set to “No”:</div><div class=""><br class=""><div class=""><img apple-inline="yes" id="5C8CA11A-4D5E-4BA4-8E02-CAC82408944F" width="473.5" height="206.5" src="cid:48BC5B58-212B-4D80-A1A4-BEF007E808EF@home" class=""></div><div class=""><br class=""></div><div class="">With “Disable Safety Checks” set to “Yes”:</div><div class=""><br class=""></div><div class=""><img apple-inline="yes" id="A34E6721-AFAD-4D6D-8A81-7D19C8DCC1A9" width="478.5" height="184.5" src="cid:2A61B3D1-EFBD-452E-AF13-3CD1926E9510@home" class=""></div><div class=""><br class=""></div><div class="">Thomas</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 4/11/2017, at 8:45 AM, Slava Pestov 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=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Nov 3, 2017, at 8:31 AM, Erik Eckstein 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=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">So if we replace Ounchecked with an option -unsafe-remove-checks (similar to -assume-single-threaded), as Johannes suggested, this is more like a “at your own risk” thing (regarding performance). For example, it might happen that users see perf regressions from one release to another, using this option.</span></div></blockquote></div><br class=""><div class="">I would suggest going further and removing the code for -unsafe-remove-checks altogether. Even untested code has a cost in terms of maintainability.</div><div class=""><br class=""></div><div class="">Slava</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></div></div></div><br class=""></div></div><br class=""></body></html>