Are you over 40? Would you like a job in Silicon Valley?

You may want to think again, according to new research by Visier, a cloud-based analytics platform for human resources professionals. The analysis of over 63,000 tech workers and 267,000 workers in other industries suggests it’s hard for people over a certain age to get a job in tech .

“Ageism is an important issue organizations across industries should be aware of and take steps to monitor and improve — not only for reasons of fairness, or to reduce the risk of age discrimination litigation, but also in light of the aging workforce and skills shortages,” the Visier report noted.

What did the study find?

• Generation X-ers (aged 34 to 51) in tech are being hired 33% less than their workforce representation

• Millennials (aged 20 to 33) working in tech are being hired almost 50% more than their workforce

• Baby boomers (aged 52 to 70) are 60% less likely to be hired than their workforce representation in tech and non-tech fields, the report concluded

Why does this matter?

The average age of a tech manager is 42 compared with 47 for a non-tech manager. And yet the older workers had more “top performer” ratings in their respective jobs and have gained more experience than their non-tech counterparts.

Tech workers move up the corporate ladder faster than their non-tech counterparts. “However, this does not translate into higher promotion rates for older non-manager workers in tech,” the report found. “Rather, promotion rates for tech workers decrease continuously with age.”

How the 'grocerant' is disrupting the $500 billion food industry

What do other studies show?

• The average age of a developer in the U.S. is 31 compared with 28 worldwide

That’s according to a separate study of more than 26,000 workers in 157 countries by Stack Overflow, an online advice site for developers and programmers. Some 24.5% were aged 20 to 24, 28.5% were aged 24 to 29, 18% were aged 30 to 34, 9.1% were 35 to 39, 7.6% were aged 40 to 50.

• Workers at the biggest tech companies are overwhelmingly young and male

Seven of the 18 top Silicon Valley companies it covered have a median employee age of 30 or younger, and only 10 have workforces with less than 30% female employees, a 2016 study by PayScale, a company that collects data on salaries, concluded.

• Seven of 18 largest tech companies have a median employee age of 30 or younger

Those 18 companies in PayScale’s report included Google GOOG, +0.65% , Apple AAPL, +0.98% , LinkedIn, Facebook FB, +1.05% , Twitter TWTR, +2.85% and Amazon AMZN, +1.79% . (Those companies were not immediately available for comment. Twitter declined to comment and LinkedIn did not reply to request for comment.)

• Employees at Facebook are among the best paid in the tech industry

With both early and mid-career employees earning over $100,000 a year, PayScale found. Almost all employees report high job satisfaction (96%), and 78% said their job has meaning. The stress levels were the lowest among all the tech companies in the report: 44% reported high job stress.

What’s the bigger picture?

•There are legal protections for older workers

The Age Discrimination in Employment Act protects workers and job applicants aged 40 and over from age discrimination and applies to employers with at least 20 employees, government agencies, employment agencies, and labor organizations with at least 25 members. Most states actually have stronger age-discrimination laws for employers with fewer than 20 employees.

•Older workers are now outnumbered

There are 89 million millennials and 75 million boomers in the U.S., compared with just 49 million Gen X-ers. “There’s no getting around the fact that companies are looking to retire older workers and hire younger workers,” says Mark James, founder and president of Hire Consulting Services in San Diego. Older workers also cost more.

• These older workers ultimately may be stuck

They may not want the longer days and stress that comes with being the top dog, but they don’t want to answer to younger employees either with new computer programming skills. Age, lifestyle and the years left to reach the top may also play a role in older employees’ ambitions, while younger workers are chasing their dream jobs.