Scottish scientists have discovered a link between genes and quick thinking skills in middle and later life.

Researchers identified common genetic variants - changes in a person's genetic code - that are related to how quickly a person is able to process new information.

It is the first time that scientists have found such a link.

The researchers say the finding could help understand how the brain works, and why some people develop mental decline, while others do not.

Experts at the University of Edinburgh were among those brought together data from 12 different countries and who made up the international consortium.

Data from 30,000 people, aged more than 45 years old were analysed.

Professor Ian Deary, director of the Centre for Cognitive Ageing and Cognitive Epidemiology at the University of Edinburgh and a co-author on the study, said: "Processing speed is thought to be a core capability for preserving other mental skills in older age. That's why my team at Edinburgh have focussed on it for the last 30 years.

"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."

The participants took cognitive function tests that included tests of simple, repeated coding under pressure of time.

Researchers then processed the results alongside details of each person's genome to identify genetic variants or changes associated with speed of thinking skills.

People with slower processing speed overall were found to have variants near a gene called CADM2, also known as Syncam2.

The CADM2 gene is linked to the communication process between brain cells, evidence of the gene's activity is abundant in the frontal and cingulate cortex in the brain, areas of the brain involved thinking speed.