It is preferred for one to walk to the mosque with calm and dignity and not in a hurry or rushing. This is because the person is considered to be in prayer when he is going to the salah (and also while he is waiting for it). Abu Qatadah says: “We were praying with the Prophet sallallahu alehi wasallam when we heard the clamouring of some men. When they had prayed, the Prophet inquired: ‘What was the matter with you?’ They answered: ‘We were hurrying for the salah.’ He said: ‘Do not do that…when you come to the salah come in peace and calm, and pray what you can with congregation and complete what you have missed.'” This is related by al-Bukhari and Muslim.
Abu Hurairah narrates that the Prophet sallallahu alehi wasallam said: “When you hear the iqamah, proceed to the prayer with calm and dignity and do not rush. Pray what you can (with congregation) and complete what you miss.” This is related by the group except for at-Tirmizhi.