In both the cases that you mentioned, the lone pair of oxygen is finally going to stabilize the carbocation by donating towards the positively charged carbon atom.
Hence stability of the carbocation may not be a very good criteria of comparing the mechanism. The migratory apptitude then plays a major role in deciding the faster mechanism.
Stability is just the thermodynamic aspect while migratory apptitude is the kinetic aspect.
Both need to be considered. Since the stability brought about by the oxygen is similar in both cases, we chose the kinetic aspect as the determining criteria.
And ron's answer clearly outlines the kinetic aspect.