A new longitudinal investigation studied 5,189 people over 10 years. It found that people with high blood sugar had a faster rate of cognitive decline than those with normal blood sugar. This was true whether or not their blood-sugar level technically made them diabetic. In other words, the higher the blood sugar, the faster the cognitive decline.
And here is a link to the formal study itself:
HbA1c, diabetes and cognitive decline: the English Longitudinal Study of Ageing