It is capable of optimizing separate pieces of code, but it would struggle to properly optimize your game as one massive coherent system. ChatGPT using GPT4 is on the horizon though and apparently it is supposed to be ridiculously better,