17 HMR all the way. There are plenty of 22LR that will match it at 50 yards but past that there is no comparison. A 17 shoots about like a centerfire rifle at 100 yards, at least on a calm day.
It's not hard to shoot a 3/4 group at 100 yards on a calm day with a 17.
Quite a bit harder to do with a 22 LR, both because of the wind, and because minor velocity spread differences really show up at that distance.
The 17 is also way more lethal on game. On a lot of ranches it has replaced the 223 as a truck gun for coyote/pigs/varmints. I've killed several pigs at 80+ yards with neck shots with the 17, just because I didn't have anything else on me. Watched them drop in the scope. Those shots would have been impossible to make with a 22LR as I didn't have time to range them and the pigs were moving.
I want my 22 WMR to be as accurate as my 17's, but it doesn't seem to be.