Their AP and Speed are pretty close. Mario's AP is likely superior if we take his power-ups into account, but Doflamingo has environmental hax with his Devil-Fruit, allowing him to turn the surrounding area into threads and use it as a weapon or a means to hold the target in place.
Parasito hax would also be a possible factor to hinder Mario's movements. Doflamingo also has Mid-Low Regenerationn due to being able to utilize his threads to seal and repair damage dealt to his organs in a relative short time-frame.
Mario's advantage is definitely in durability with Starman, but Doflamingo has a massive environmental advantage due to pseudo flight and the ability to trap opponents in his threads and the fact that, even if he were to take hits despite his threads defending him, he would be able to quickly seal wounds made by Mario, unless they are outside his ability to regenerate (such as loss of his head >_>).
Granted, i do not know Mario to a degree in which i can say it's comparable to my knowledge of Doflamingo.
Doflamingo's advantages: Range (dozens of kilometers), Clairvoyance (and pre-cognition with CoO), Environmental manipulation hax, Mid-low Regen, the ability to use Bird-Cage as means to limit Mario's movement, Parasito hax, Haki acts as an outer shell that can protect Doflamingo from Mario's Cyrokinesis (He shrugged off Aokiji's freezing powers, despite being briefly out of breath), and the fact that Doflamingo's physical strikes are already several dozen meters in range.
Mario's advantages: Durability with Starman makes him near invincible, and a wide variety of powers including pyrokinesis and cyrokinesis.
And both have flight.
Without any power-ups for Mario, I see this being a win for Doflamingo mid-difficulty due to him having superior protective and offensive capabilities on top of his hack potential.
With Mario Power-ups, I still see Doflamingo winning with relatively high-difficulty due to the same reasons, but also because he has pre-cognition, mid-low regen, and range as a crutch if things start going bad for him.
Then again, i do not know all that much about Mario's power-ups >_<