Optimizing games "for various hardware" is an impossibly difficult task. At best, you can optimize code for a handful of what you expect to be typical combinations covering the low-to-Ultra range (Minimum/Recommended/Best) you intend to support as a developer and hope for the best on everything else.Some of the game DEVs don't even beta test/code the game properly, optimize it for varying hardware, or do a thorough performance analysis in their lab prior to release.