Any Silicon Valley hiring manager will tell you that engineering talent is rare and valuable. And we all know the true cost of turnover is far greater than your balance sheet may suggest. So it stands to reason that you should understand why your top technical hires are most likely to leave.

That's the premise behind a new Glassdoor survey that asked 1,400 software engineers this critical question: What are the top reasons you would leave your job?

The top five responses--and the percentage of engineers who gave them--were as follows:

1. Compensation: 78 percent (though it should be noted that more than half of the engineers said they would take less money to work in a great culture or for a great brand)

2. Career growth opportunites: 76 percent

3. Type of work: 58 percent

4. Company culture: 53 percent

5. Location and commute: 41 percent

The corporate defenses against some of these risks are stronger than others. It's no shock that raises and promotions are powerful HR levers. But things like type of work and company culture are less flexible, at least in the short term--and speak more to the cultural fit between the employee in question and your company.

The silver lining? Software engineers aren't terrified of sunlight after all. Only 12 percent said frequency of required travel would cause them to leave.

Check out this infographic for more of Glassdoor's findings:

 inline image