It all depends on the frame geometry and how long the top tube is.
For example I'm 5'9" and I rode a 17" Specialized Rockhopper MTB. I tried the 19" frame version to compare and it just felt all wrong. Then I upgraded to a 'Medium' sized Scott Scale 10, which is near enough the same dimensions as the 17" frame Rockhopper.
I have just bought a new training frame, sized 'small', (47cm) which is exactly the same top tube length as my custom built 54cm road bike?
The bottom line is get the measurements first, then take it for a ride and see how it feels.
Once upon a time most frames (if not all) were sold on the length of the seat tube, but with sloping top tubes and compact frames, you need to be so careful. Trust me I know.
A couple of years ago, I bought a Dolan training frame, sized 54, seat tube length, same sized as my Rourkie road bike, which is a perfect fit for me. But like a complete knob I never even thought to check the top tube length. Anyway I built the bike up and it was way to long for me, the top tube was miles longer than I was used to. I tried to compensate this by reducing the length of the stem, but this made the steering very twitchy and it did not feel comfortable.
So after a couple of months I then bought a
Ribble frame, but had to drop down to a 50cm frame to get the right length top tube length. But I then ended up with 50mm of spacers under the stem to get the height!
!
So now I have bought yet another frame, a Ridley Triton T and its perfect in every dimension.
Thank feck for that, I heard my missus cry from the kitchen.