Mario and it's not even remotely close.
Sonic is not in the same league and never has been. His best games are decent enough, but even then when you're going fast it's more a matter of watching rather than playing, and when you slow down the actual platforming is mediocre. He got by on strong presentation and good character design, but never has he actually rivaled Mario in terms of actual game quality.