Will a bad speedometer sensor affect how a 1991 Nissan Stanza runs at certain speeds?

Yes. My 91 Stanza was running poorly, poor gas milage, the speedometer works sometimes, when i hit a bump it will do the opposite - if it was working and i hit a bump it will stop working until i hit another bump. I resolder each solder at the back of it and problem solved. Better gas milage.