> On Jun 29, 2016, at 6:05 PM, David Sweeris via swift-evolution > <[email protected]> wrote: > > > > Sent from my iPhone > >> On Jun 29, 2016, at 17:45, Rod Brown via swift-evolution >> <[email protected]> wrote: >> >> From my understanding, "Sealed" or whatever we will call it technically >> provides no actual optimisations. We cannot assume the class is final >> because something inside the module may have vended a subclass. > > Sure we can. Because the class is sealed, the compiler can know that no > further subclassing is possible, which can allowing it to use static > dispatch, inlining, etc wherever possible.
The compiler knows that subclasses cannot happen outside the module, but if subclasses exist within the module there will be many cases where the compiler won’t be able to devirtualize. > > I think... > > - Dave Sweeris > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
