Those optimisations are not there to compensate anything; they will improve performance of single-threaded code with or without GIL.
Those optimisations are not there to compensate anything; they will improve performance of single-threaded code with or without GIL.