Depending on what you intend doing with it!
Either of the foregoing replys could be correct!
In my experience, owning both and hunting groundhogs with both:
1) The .17 HMR is more accurate and more flat shooting than the .22 mag.
2) The .22 mag has more " knock down punch" and the rounds are less expensive, although I suspect that when there are more .17 rifles around and more .17 rounds are being made...the price gap will close , somewhat...
Just my two pennies...