Genetic differences could explain why some people are quicker thinkers in middle age and later life, a study of data from 30,000 people suggests.
Researchers identified common genetic variants linked to an individual's ability to process new information.
The relevant gene has also been linked to autism and personality traits.
The study, involving Edinburgh University, said the findings could help the understanding of mental decline.
The large international study, published in Molecular Psychiatry, looked at data from 12 different countries, including Scotland, Croatia, Australia, Finland and Holland.
The participants, who were all at least 45 years old and did not have dementia, took cognitive function tests to test how quickly they processed information.
People with slower processing speed overall were found to have variants near a gene called cell adhesion molecule two (CADM2).
Good processing speed is linked to how other important skills operate, such as reasoning and memory.
The CADM2 gene is linked to the communication process between brain cells.
Evidence of the gene's activity is most pronounced in those areas of the brain that involve thinking speed.
Two other genetic variants, associated with memory performance and general cognitive functioning, were also recently discovered in older adults using the same large group of participants.
Prof Ian Deary, co-author of the study and a director of the centre for cognitive ageing and cognitive epidemiology at the University of Edinburgh, said: "Processing speed is thought to be a core capability for preserving other mental skills in older age.
"This inkling into why some people's processing speed is more efficient than others is a small but encouraging advance in understanding the biological foundations of more efficient thinking."
However, he stressed the association was small and the study was only able to detect it because it involved such a large number of participants.
But he added there would be more such findings as studies increased in size.
Dr Jonathan Roiser, from the Institute of Cognitive Neuroscience at University College London, said the study results were impressive.
"Overall, they are statistically significant because they have found the same effect in the same direction in almost all samples in the study, no matter where the participants are from.
"We thought it was the case that cognitive abilities have a genetic basis, and this is nailing down one of the variants."