This is a debate fans never seem to settle. In many depictions, Shadow is the quicker of the two, particularly when he's skating, while Sonic holds his own when running at full tilt. Depending on the game or show, the two often end up evenly matched.
Ultimately, "who wins" comes down to which version you're watching or playing. Both are among the fastest characters in their universe, and that's exactly why the rivalry is so fun.