In our experience (nearing 40,000km of cycling), stopping and looking the dog right in the eye, showing no fear, works the best. Throwing a few rocks while stopped can help too and then progress very slowly by the dog, walking if you have to. We think there's something in the sound of the spokes that makes the dogs want to chase you but whatever it is, when you stop you break the chase sequence. Very rarely we've had quite aggressive dogs that have made us nervous about being bitten. In this case, we get very aggressive with our body language and throw lots of rocks or get out a pump to threaten them with. An old grandma saved me from a few nasty dogs in Iran by beating them with her broom
So far, no bites. But I wouldn't try to outrun any dog unless you're going 30km/hour and can sustain that pace.