For the study, 3,126 people were asked questions that measured their personalities and attitudes, ability to cope with stress, and memory and thinking abilities at the start of the study when they were an average age of 25.
Cognitive abilities were measured again when they were an average age of 50.
"We may not think of our personality traits as having any bearing on how well we think or remember things, but we found that the effect of having a hostile attitude and poor coping skills on thinking ability was similar to the effect of more than a decade of ageing," said Lenore J Launer, from the US National Institutes of Health.
Another question looked at effortful coping, which was defined as actively trying to reduce stress despite repeated barriers to success, researchers said.
For the analysis, participants were divided into four groups based on their level of hostility and effortful coping.
The study found that for both personality traits, people with the highest levels of the traits performed significantly worse on tests of thinking and memory skills 25 years later than people with the lowest levels of the traits.
Those with the highest level of effortful coping remembered up to 0.30 fewer words than those with the lowest level of effortful coping.
The results were the same when the researchers adjusted for factors such as depression, negative life events and discrimination.
When researchers adjusted for cardiovascular risk factors such as diabetes and high blood pressure, the results stayed the same for the coping trait but the relationship between hostility and thinking skills was reduced.
The study was published in the journal Neurology.
