Re: [swift-dev] question about performance of dispatches on existentials

2017-07-08 Thread Johannes Weiß via swift-dev
Thanks very much Arnold, also for filing the bug! > On 7 Jul 2017, at 8:07 pm, Arnold Schwaighofer > wrote: > > This is a failure in the optimizer of identifying two loads to return the > same value and so it can’t remove a retain/release pair. > > > / protocol witness for B.foo(_:) in confo

Re: [swift-dev] question about performance of dispatches on existentials

2017-07-07 Thread Arnold Schwaighofer via swift-dev
This is a failure in the optimizer of identifying two loads to return the same value and so it can’t remove a retain/release pair. / protocol witness for B.foo(_:) in conformance OtherB sil shared [transparent] [serialized] [thunk] @_T04test6OtherBCAA1BA2aDP3fooyAA1ACFTW : $@convention(witness_

[swift-dev] question about performance of dispatches on existentials

2017-07-07 Thread Johannes Weiß via swift-dev
Hi swift-dev, If I have basically this program (full program see at the tail end of this mail) public class A { func bar() { ... }} public protocol B { func foo(_ a: A) } extension B { func foo(_ a: A) { a.bar() } } public class ActualB: B { } public class OtherB: B { } func abc() { l