All humans are related, if only distantly. Some 16 million people living in the modern world can trace their heritage back to Genghis Khan, for instance. But procreating with your less-distant relatives tends to be less common these days if you’re not royalty (half the states in the U.S. prohibit marriage between first cousins). Just how important is diversity to the human gene pool?

An international team of geneticists and public health researchers decided to find out by studying the genomes of more than 350,000 people from four continents. The new study, published in the journal Nature, compares associations between levels of homozygosity—when copies of the genome inherited from each parent are identical—and attributes like height, lung function, educational attainment, and cognitive abilities (as measured by several tests).

They found that people whose parents were more closely related to each other were shorter and had lower levels of lung function, cognitive abilities, and education than people whose parents weren’t quite as close on humanity’s family tree. The effect of being the offspring of two first cousins, they found, was approximately equivalent to being 1.2 centimeters shorter and having 10 months less education. Unlike previous studies, this one didn’t find any association between having related ancestors and having higher blood pressure or cholesterol levels.

“This study provides evidence that increased stature and cognitive function have been positively selected in human evolution, whereas many important risk factors for late-onset complex diseases may not have been,” the researchers write. So, mixing with our more far-flung kin has helped humanity get taller and smarter. But while married cousins might have shorter kids, at least they probably aren’t any more likely to have heart disease.