It depends on what you value:
You can even settle it in Super Smash Bros. Brawl on the Wii, where both are playable. Both are heroes in their own right. Speed favors Sonic, but if you weigh sheer heroics—Mario repeatedly rescuing Princess Peach—many lean toward Mario. In the end, it's a matter of personal preference.