You didn't mention your age or bone status, two important points in making these choices. Older patients (65 years old and older) with poor bone density may not be able to grow enough new bone to heal a fracture that's pinned. The hip replacement may be the best option.
Is the fracture stable (fracture line hasn't moved), separated (bone has drifted apart) or impacted (one side of the fracture is pushed into the other side)? A stable fracture that hasn't moved or shifted is often treated by internal fixation. This means screws are used to hold the bone together until it heals.
If the fracture can't be pinned together or if there are serious arthritic changes in and around the bone and joint, then a joint replacement may be needed. According to the results of a recent study, older adults have better results with a total hip replacement.