My first time fighting the star swarm, I had luckily just met a friendly NPR with an enormous speed advantage, prompting me to build a few "hero ships" capable of matching their speed just in case hostilities ever occured. Though they had to be tugged to the combat zone and even still made a visible dent in my fuel economy, these few hero ships saved the entire race numerous times alone. Just the largest, highest-boosted engines you can develop, the longest, hardest hitting weapons you can mount, and enough fuel and maintenance to last for a single slugfest. Worth every penny.