3 ms·
What I came away wondering is whether it would make sense to just check in the asm with the optimizations you like once you finagle it. The author mentions bein
by sanderjd 5y ago
What I came away wondering is whether it would make sense to just check in the asm with the optimizations you like once you finagle it. The author mentions being concerned about regression in future compiler versions (which seems reasonable since it already happened once) and this would solve that problem. It seems like a trade off is that you would not get future optimizations for that architecture, but this seems like a pretty small risk.
- saagarjha 5y agoI know some projects that use that policy. Here's an example off the top of my head: https://github.com/apple-open-source-mirror/objc4/blob/fd6759b797e47d7b0b20c87e694ddda09d41bbef/runtime/objc-runtime-new.mm#L7386 https://github.com/apple-open-source-mirror/objc4/blob/fd675.... Looks fairly reasonable, with method calls and such, but after inlining and optimization it compiles down to the right handful of instructions that the authors intended it to.