Optimized PIT handling code.