A steady 31 knots is still a pretty good speed for most warships over that kind of distance. But the Navy doesn't tell you what the sustained speed capabilities of its nuclear carriers and submarines are. If they are willing to leave the battlegroup behind, the CVN's get get somewhere in a real hurry.
Submarine speed is primarily limited by sound levels. Modern USN subs are a lot quieter at speed than they used to be, but going fast still makes more noise, which not only helps the enemy find you, but blinds your own sonar. But they can go very fast when they need to. When I was in the Navy, some 688 class subs were fitted with speed props rather than the normal ones optimized for minimal noise at low speeds. The "interceptor" boats were really fast, but nowhere near the speeds the CVNs can do.