For all of the complaints that San Francisco rent is driving young people out, the City by the Bay may not be experiencing as much of a millennial exodus as other costly cities.

A new report from real estate site Trulia, called "Priced Out," analyzes the relationship between high housing prices and city migration. Trulia concludes that millennials are leaving costly cities like New York and Washington, D.C. at much higher rates than Generation Xers or Baby Boomers. But, cities with promising tech jobs may be better at keeping millennials than others.

Mark Uh, a data sciencist for Trulia, looked at the 10 metropolitan areas with the the highest gross rents, using Census Data from 2010 to 2014. He then examined the data using three different demographic filters (age, household income, and occupation), and looked at which demographic sectors were moving away at higher-than expected rates.

In theory, the change in population should be at a rate that keeps the population make-up the same. He writes:

If people with brown eyes make up 60% of a city’s population, our expectation would be that 60% of everyone who moves out would have brown eyes.

From 2010 to 2014, millennials moved away from all of the 10 metropolitan areas with the highest rents at a higher-than-expected rate. But, two of the most-well known "tech hubs" on the list--San Jose and San Francisco--had two of the lowest move-away rates on the list. (To be sure, the rates are probably still much higher than city officials would like, at 98.3 and 91.1 percent, respectively.)

The area with the highest millennial move-away rate is Silver Spring, Maryland, at a whopping 144.2 percent. San Jose and San Francisco also had lower move-away rates than New York, Chicago, and Washington, D.C.

In addition, Trulia found that residents of these 10 cities whose jobs fit into the "Information and Communications" industry (which includes tech workers), are actually less likely to leave the cities. Their move away over five years was negative 11.4 percent. 

But not all places with lots of tech workers may be immune. Oakland, CA, which some San Francisco tech workers have fled to in order to escape high rents, has seen millennials move away at a rate of 111.5 percent over the past five years, the third highest on the list.

Why are some millennials biting the bullet and sticking it out in pricy San Francisco? Better job opportunities, in theory. The average annual salaries of tech workers in San Francisco and Silicon Valley is $118,243, according to

"Generally speaking, the booming tech industry has created a lot of job opportunities for young adults, and many Silicon Valley companies offer perks that reallly appeal to millennial workers," Uh tells Inc. 

But this trend may start to change over the next few years. A survey conducted earlier in April by job hunting platform by Inc.'s Tess Townsend--found that of the more than 50,000 tech workers that were surveyed, 29 percent were planning to leave San Francisco. The reason: high rent.