How can you switch back and forth? At you using a whole different computer, including motherboard, RAM, and disk?
i7 to i9 isn't an age thing. The i9 costs almost double the i7 within a single release year.
And the slowness in compiliation isn't a Windows thing, it's a heavy workload thing. Windows is slow because of IO, not CPU speed.