Kinda new here, should I submit at bugs.swift or through Apple radar or both?
Yes my original train of thought was that unowned(unsafe) was suppose to be a simple pointer with no ref counting. So I’ve originally been using it everywhere in my performance-critical code, even in cases where there is no retain cycle as an optimization (although I’m sure the compiler could probably have optimized some of its usage). But as of today, I literally have just done find/replace-all to remove all usages of it because of its overhead. This is true in both Xcode 12 beta and Xcode 11.5.
And just to verify, I downloaded Xcode 11.1 and ran the same code and the performance was good again. So at some point after Xcode 11.1 unowned(unsafe) gained a lot of overhead (to the point where it’s not worth using in performance-critical code).