Performance
Framework Adoption
In general, in the first release garbage collection (GC) should have adequate performance for most Cocoa-level application programming. Some real-time and multi-media applications, however, may suffer performance (and even stability) problems.
The memory allocator for garbage collection is modeled after the underlying malloc
and is intended to have similar performance characteristics. In the first release, however, the collector will not throttle allocation and so allocation-heavy threads may outrun the collector. Overall, allocation rates are lower than traditional malloc
.
Since the collector runs on a background thread and obviously has to do work, a GC-enabled application is likely to consume more CPU cycles than it would without GC.
The first release of garbage collection for Mac OS X is not only the first release of the GC architecture itself but also of support for GC within the system frameworks. Adoption within frameworks is also at the 1.0 level, and is expected to improve with subsequent releases of the operating system. The frameworks themselves have been well-tested in most contexts, nevertheless some paths have received less coverage. If you find errors, you should report them using Apple’s bug reporting system.
Last updated: 2007-10-31