In the race also, Rainbow Dash has speed to sail through the air, cross obstacles and dodge quickly. In contrast, Sonic, it is obvious that he can not fly but his quick reactions to cross an obstacle make him very agile and dodge easily thanks to his super speed
In a battle, it depends on what requirements they use