News for hackers. Stuff that matters.
Re:How Swift Achieved Dynamic Linking Where Rust Couldn't by NobodyNada on Saturday November 09, 2019 @03:38PM (#21494198)
The really expensive part here is not the use of a protocol, it’s the downcast (which isn’t really idiomatic Swift). Static dispatch is always faster than dynamic dispatch/polymorphism, but protocols are usually reasonably efficient (even more so if you can use generics instead of existentials).

There are no comments on this comment yet.