I think longer than 3 years and you are committing yourself to wage depression, from what I've read from various hiring managers.
If you joined with a 4-year vesting package when the stock price was $10 and now it has risen to $30, you will probably be taking a big pay cut by leaving after 3 years.
You said staying at a job for longer than 3 years is committing yourself to wage depression. That's not always true. If you have been at a company for 3 years and were given a 4-year grant at a $10 stock price, but today the stock price is $50, it's unlikely you'll find better compensation by leaving and should probably just stay for year #4.