The include-what-you-use (IWYU) policy is beneficial to faster
compilation and fewer recompilations. Many build tools, such as GNU make,
provide a mechanism for automatically figuring out what .h files a .cc
file depends on. These mechanisms typically look at #include lines. When
unnecessary #includes are listed, the build system is more likely to
recompile in cases where it is not necessary.
With the enforcement, header file <include/mimalloc.h> no longer
includes <stdlib.h>.
Reference:
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/WhyIWYU.md
mi_option_get is called frequently in stress tests, and the patch adds
extra hint to the compiler to emit instructions that will cause branch
prediction to favour the "likely" side of a jump instruction.
Most processors have carry flags which they set on addition overflow, so
it is a good idea to access them whenever possible. Most of them also
have widening multiply instructions that can be used to detect overflow
of the non-widening version. Both GCC and Clang offer a way to detect an
overflow for security critical applications.
Reference:
https://clang.llvm.org/docs/LanguageExtensions.html#checked-arithmetic-builtins
The include-what-you-use (IWYU) policy is beneficial to faster
compilation and fewer recompilations. Many build tools, such as GNU make,
provide a mechanism for automatically figuring out what .h files a .cc
file depends on. These mechanisms typically look at #include lines. When
unnecessary #includes are listed, the build system is more likely to
recompile in cases where it is not necessary.
With the enforcement, header file <include/mimalloc.h> no longer
includes <stdlib.h>.
Reference:
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/WhyIWYU.md
mi_option_get is called frequently in stress tests, and the patch adds
extra hint to the compiler to emit instructions that will cause branch
prediction to favour the "likely" side of a jump instruction.