Swizzling refers to the translation of object references from an external, persistent format to an internal, transient format used during application execution. Eager swizzling schemes translate all the references contained by objects as they are made resident. Lazy swizzling schemes defer translation of references until they are loaded from their container. Eager swizzling has the advantage of presenting a uniformly swizzled representation of references to the execution engine, at the cost of up-front translation of references that may never be used. Lazy swizzling avoids this cost, but requires a run-time check that we call a swizzle barrier to detect and convert unswizzled references as they are accessed. Lazy swizzling is most often used in situations where accesses are likely to be sparse and the up-front cost of eager swizzling is prohibitive. For example, large containers, such as arrays, may contain many thousands of references, only a fraction of which are ever actually acces...
Kumar Brahnmath, Nathaniel Nystrom, Antony L. Hosk