Been through about a thousand of 'em

Used to work in PT as an aide.
The 3 biggest things -
1 - get your doc to give you a pre-op PT appointment, so you can start doing exercises, etc. BEFORE the operation.
2 - when you get to the recovery room, they will put your knee in a machine that bends it, then straightens, then bends. USE THIS MACHINE AS MUCH AS YOU CAN!
3 - do what your PT says to do. If you do not hate your PT, either they aren't doing their job, or you are slacking on your exercises, walking, and knee bending
We had one guy who had a knee replaced and said that what we put him thru was worse than what the Germans did when he was shot down during WW2. He also came back 6 months later to have his other knee done with a smile on his face.
The fat little old ladies who would wimp and whine about the pain, not get up to walk, etc. always took the max hospital stay and then went on to a rehab facility. The folks who did the exercises, were in shape to some degree to begin with (could walk 100 feet without a breather), and did what the PT said to do went home 4-5 days post-op.