As well as where one lined up in positions. SAF and CQ changed tactics in 2006-07 which is when Ronaldo took off in scoring and play-making by moving closer to goal and given more free reign in attack, more 4-3-3 or 4-2-3-1 wide forward. Those career numbers are skewed through his first three years at United.
Ronaldo played as a traditional 4-4-2 winger his first three seasons with United. He was a pacy, hug the line, go around/past the opposition, and dribble into the box or cross/pass into the box winger in those tactics. That's 137 appearances with 27 goals over 9484 minutes, about 105 matches over full 90. His goal return was every 351 minutes these years. He certainly was not clinical in these early years, and frustrated fans with his moon shots, whereas Messi always was the more clinical finisher from the get. Though Ronaldo could beat the defender or keeper with either foot.
Minus these United winger stats he's on 83312 minutes with 792 goals, a goal every 105 minutes in roughly 15 more averaged full 90 games. Who knows how his numbers might have looked if United were playing a more advanced system and closer to goal when he first arrived; he'd certainly have scored more but probably not massively. I don't know how he was positioned for Portugal and Sporting in these years.
Not saying it makes him the better player - he's not - but Ronaldo's tactical positioning made a huge mark in his early statistics. For United, the goals mostly went through the two forwards (Rooney and van Nistelrooy) with the mids and wingers chipping in a handful each per season.
As far as I know, Messi has always played closer to goal his entire first team career and never as a traditional 4-4-2 winger.