A method of optimizing the geometry of a femoral stem (20) of a hip joint prosthesis is disclosed. The femoral stem (20) comprises a neck (21) and an anchoring blade (29) that is attached to the neck (21) and that tapers towards a distal end (23) with a lateral narrow side (28) comprising a distal straight portion (33) and a proximal arcuate portion (32) corresponding to a curve. The transition between the distal straight portion (33) and the proximal arcuate portion (32) occurs at an outer lateral point (29). The method comprises a means of optimizing the profile of the curve of said proximal arcuate portion (32) by a process of iterative modeling steps using a series of curves each defined by a path traced by the outer lateral point (29) on withdrawal of a profile of the stem (20) from a cavity (35) of complementary shape to the stem (20). Preferably, during withdrawal of the profile of the stem (20) from the cavity (35) contact between lateral-distal (36) and proximal-medial (37) stem contours and respective associated boundaries of the cavity (35) are maintained. A femoral stem of a hip joint prosthesis produced by this method and a hip joint prosthesis system for use in the implantation of said femoral stem into a femur are also disclosed.