<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="">Hi, all. I filed&nbsp;<a href="https://bugs.swift.org/browse/SR-292" class="">SR-292</a>&nbsp;today complaining about StdlibUnittest taking 13 minutes to build on my machine, 9 of which are spent in SIL optimization. I had a pretty strong feeling that this happened some time in the last few months.<div class=""><br class=""></div><div class="">Continuing to experiment, however, I found that this only occurred when I was compiling the Swift compiler in Debug mode. Now, debug builds are super important for those working on the compiler, because you can't interactively debug a Release build in any meaningful way. But at the same time, it's not really a configuration that we want to be optimizing for.</div><div class=""><br class=""></div><div class="">Running under Instruments showed me that unoptimized DenseMaps are not fast, but other than that it's mostly just that we do a lot of SIL work on a lot of code.</div><div class=""><br class=""></div><div class="">I've thought of a few possible "solutions" to let me keep my Debug build:</div><div class=""><br class=""></div><div class="">(1) Compile StdlibUnittest as -Onone in Debug mode. This means I'm not really testing a lot of things since they depend on the optimizer having actually inlined the code, but it's already not a shipping configuration anyway, and we do have buildbots.</div><div class=""><br class=""></div><div class="">(2) Break out the expensive parts of StdlibUnittest into Yet Another Private Library, and then <i class="">disable</i>&nbsp;that library in Debug compiler builds.</div><div class=""><br class=""></div><div class="">(3) Always keep two active build directories, a Debug compiler and a Release compiler, and come up with an aggregate target that doesn't build StdlibUnittest. That way I can still run individual tests with my Debug compiler, but I'd only ever run the whole test suite with the Release one.</div><div class=""><br class=""></div><div class="">Opinions?</div><div class=""><br class=""></div><div class="">Jordan</div></body></html>