If you're using a game engine then forget it. If you're making your own, then the only thing you really need to know is variable timestep and building your physics based on it. It allows your framerate to be adjusted to any number, and the game will work at a consistent speed regardless of framerate changes or fluctuations.
There's other things that probably aren't very surprising; make sure controller input gets accounted in the game logic as soon as you can make it (e.g. at the start of the current frame, not at the end). Make sure that it's possible to press a button multiple times in a single frame without it being interpreted as 1 press, and make sure you can press and release a button inbetween a single frame without that press being skipped. Never ever use vertical sync, or any kind of effects/techniques that require you to delay frames or the game tick.
In regard to opimization, it probably doesn't matter because the chances you'll build something that modern computers struggle to handle isn't very high. But if you want to be sure, just get into the habit of building things with "data-oriented design" in mind. Basically be wary of object oriented techniques (it's not all bad but most of it is), avoid RAII, never ever use a linked list, any data structure in a list that needs to be looped through very fast should be as small as possible...