What causes method cache thrashing in Objective-C runtime?

Updated May 17, 2026

Short answer

Cache thrashing occurs when frequently used selectors evict each other in limited cache slots.

Deep explanation

Method cache uses hash tables. If too many unique selectors are invoked in tight loops, collisions force evictions. This reduces cache hit rate, increasing expensive method lookup in class hierarchy.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More Objective-C interview questions

View all →