Skip to content

Comment on The Surprising Cost of Protocol Conformances in Swift

Comments

I feels like I must be missing something. 3ms is extremely slow. Surely it should be 3us, no? What’s it doing that is so slow?

Function names like "_dyld_find_protocol_conformance" seem to indicate that DLLs might need to be accessed, and my (entirely subjective) impression is that this general area seems to have become a lot slower in recent macOS versions, at least when system DLLs are involved.

It’s ms, that slow because every protocol conformance in every dylib needs to be checked. When this gets to 100k+ like in many large apps it takes multiple milliseconds

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.