Is there any site on SE where someone can ask a question on how to optimize a piece of code they have?
While Stack Overflow and Programmers SE are great for problems you're facing with code that isn't complete and working, Code Review SE is the site for questions about code that works, but it might just simply smell kinda funny.
The folks at Code Review SE will help you optimize your code so that it can be all that it can be. Just be sure to read the list of topics first, as this will help you formulate your question in a manner to where you'll get the best answers possible while simultaneously giving back to others who may be searching for the same problem. Good luck!