I'd suggest that the first decision is whether to try to escape or to stop. If you can beat the dog for speed, no problem (unless you are a Wiggo wannabe with a dodgy ticker.....) If there's a good chance that that the mutt will catch you, then I think you are inevitably safer stationary and on your feet rather than astride a bike. I've successfully used a bike as a shield, but it's not ideal. Passing traffic is sometimes acts as a distraction and there's always the hope that the animal will be hit by a car. I've posted before that a huge (small donkey sized) dog chasing my then young son was hit by a car being driven much too fast. The dog ended up completedly trapped under the car, howling pathetically.
(My neighbour is enjoying his retirement in some far off land. I'll watch out for his return.)
PS
I think if there are two of you there is a lot to be said for standing appart, rather than huddling together. This means that the cur has to pick a target and turn its back on the other . If you are then both brave / daft enough, the "bystander" attacks the dog's back end and if it turns on them, the original target does the same. It only needs so many blows with a big stick / heavy boot for most mutts to get the message.
The dangers here can be very real. Apart from dealing with plenty of dog bites over the years, I remember we used to be issued in Leeds with a really heavy quality woolen overcoat. The skirt part at the back fell down in vertical folds (probably going back to some earlier age when it helped to keep the horse warm.) Anyway, a colleague was attacked by a large dog which went for his backside. Although the resulting origami effect caused some ribald humour, if he hadn't been protected by the bulk of the coat fabric, he would have been seriously injured.