Note the terms 4140 and 4150 do not in any way specify or guarantee the complete composition or machining of either of these alloys. There are many variants which have both standard and private commercial letters to specify differences in the metals.
I believe in rifle barrels both are considered a medium carbon alloy. Both have roughly the same chromium and molybdenum ratio. I’m not a machinist (my father also is and I have tried to pick up on it for auto-racing applications) but, I believe that the 4150 has a higher carbon content allowing better hardness through heat treatments.
I laughed cause 4WHEELINGUNNER’S father’s response would so imitate my father’s response to such a question. "both will last a loooong time, don't worry about it." Although first, my father would ask; “Why, what are you doing now?”