Darwin: Default 64-bit architecture tuning to 'core2'.
Darwin 64-bit builds now default to 'core2' tuning for better performance on modern processors.
For 64-bit Darwin targets, the default architecture tuning has been changed from a generic setting to ‘core2’. While ‘core2’ has been the minimum processor target for years, this change ensures that generated code takes advantage of its specific features, such as 16-byte compare-and-swap instructions, leading to improved performance.
In Details
The config.gcc file has been updated to set the default architecture tuning for 64-bit Darwin to 'core2'. This differs from the 32-bit case, which requires special handling due to the lack of a direct GCC core definition. The goal is to ensure that default code generation benefits from processor-specific features available in the 'core2' architecture.
- Darwin
- The operating system developed by Apple, used on macOS, iOS, and other Apple platforms. In this context, it refers to the build target.
- architecture tuning
- The process of optimizing compiler output for a specific family or generation of processors to leverage their unique instruction sets and performance characteristics.
- core2
- An Intel processor microarchitecture released in 2006, known for its performance improvements over previous generations. It supports specific instruction set extensions.
- 16-byte compare & swap
- An atomic memory operation that compares the contents of a memory location with a given value and, if they are the same, modifies the memory location to a new given value. The '16-byte' refers to the size of the data operated upon, which can be efficiently handled by certain processor instructions.