[swift-users] Design and performance of Vector2/3/4 and Matrix

Janosch Hildebrand jnosh at jnosh.com
Fri Dec 18 18:41:56 CST 2015


> On 19 Dec 2015, at 00:46, Michael Gottesman via swift-users <swift-users at swift.org> wrote:
>> 
>> This is becoming clear. Hopefully these patterns can be optimized across modules eventually. It's easy enough to write a pre-processor that expands the generics into four specializations. But it doesn't solve everything so not a priority.
> 
> We do want to be able to perform these sorts of optimizations (among others) across module boundaries. The reason that it has not been implemented yet is that the model for when/how one could (for instance) inline across module boundaries is not finalized. This will be possible once the resilience feature is complete.


> On 19 Dec 2015, at 00:30, Joe Groff via swift-users <swift-users at swift.org> wrote:

>> This is becoming clear. Hopefully these patterns can be optimized across modules eventually. It's easy enough to write a pre-processor that expands the generics into four specializations. But it doesn't solve everything so not a priority.
> 
> I know that cross-module whole-program optimization is a long term goal for the build system; at what priority, I'm not sure. We do have some totally not-ready-for-primetime functionality for cross-module inlining and optimization that's used by the standard library and overlays; these libraries use special flags to serialize SIL bytecode into the module file. You can poke around the cmake files to see how the stdlib is built, though you're off the supported path if you try to mimic it. 
> -Joe


Looks like I was too late :-)
Also thanks for the very informative answers! I had wanted to ask what the plans were in this regard anyway.

- Janosch



More information about the swift-users mailing list