glGet* functions might cause synchronization. It's better to avoid them. during rendering. It's not a powerful optimization, It depends on many things. Locally I got only ~2% for the frame time.
The two main things: the change shouldn't decrease performance and it helps to have a more clear profiler results.