I'm certainly more in this camp of not looking to switch, but in the past I've moved jobs in the 2-3 year range. Right now, I feel that I'm well compensated, at a place that offers great work-life balance, is tackling interesting problems, and just lets me do my job. Part of the reason I'm not interested in leaving is that this is the first place that really has all four of those things, and given it took me 9-ish years to land at a place like this, there's going to have to be a significant jump in salary (like an extra 25-35%) to get me to move because of factors beyond my bottom line take home pay.
That being said, I've "hopped" jobs earlier in my career, but more in the 2-3 year window rather than 6-8 months. I can only imagine what I'd be making if I was still at the first two places I worked. It'd probably be 2/3rds of what I'm making now at best.
I don't think it's as clear as "always stay" or "always hop". At a certain point in your career, hopping may be looked at as a liability, and staying in a position that's a bad fit or doesn't advance your career doesn't make sense. Ultimately a job and your career is more about numbers, and you've got to optimize for more than just that. Understand when you are leaving money on the table, and when you've got something worth sticking around for.