This change does the following for python builds (it makes no changes to Blender itself):
- Non-debug Windows builds: enable profiler-guided optimization
- Apple/Unix: enable full optimization suite (LTO and PGO) and if building with gcc 5.3 or newer also disable semantic interposition. Non-gcc (or older gcc) compilers will get the LTO/PGO switch, but semantic interposition CFLAG won't be added as it is specific to gcc.
While a day-to-day user likely won't see much change, there is potential for addon performance improvements of up to 30% (though more likely 10-20% based on my own non-blender python workloads using these build tweaks) when not blocked by the C API. I have been using python builds with '--enable-optimizations' in production HPC workloads for years and have not run into any trouble due to it - it should be a safe change in and of itself.
In all cases this should increase (or leave unchanged) python interpreter execution times. In the case where semantic interposition is disabled, the potential performance gain is stronger, although LD_PRELOAD will no longer work with the produced libpython. This should not matter for Blender, which does not use this as far as I can tell. Other syscalls (eg to libc) should be interceptable as normal.
https://developers.redhat.com/blog/2020/06/25/red-hat-enterprise-linux-8-2-brings-faster-python-3-8-run-speeds/ goes into more details on what this is doing under the hood. It's not specific to python 3.8 or RHEL 8.2.
Python version notes: the --enable-optimizations flag became valid in Python 3.5, and the --pgo flag for the Windows python build.bat goes back at least that far.
Final note: I do not have the means to fully test builds /w this change on all supported platforms, but I do believe I've covered all the bases.