What Determines Ship Speed?

The help mentions that heavy ships will be slower, but it seems like there are other factors involved. For example, if I start a new game, my ship speed may be 30/30 one time, then 20/30 the next. Shouldn’t this be pretty much the same at the start? What all will affect ship speed aside from engines and mass? How can I boost my % of max speed?

This is looking more and more like a bug-- probably an uninitialized variable somewhere. When I load a save game, then re-save it under a new name my speed as a percentage of my maximum changes.

I’m running 2.41 on Windows XP Pro SP2.