An anonymous reader writes: Researchers from Oregon State University have completed a study into how the sugar and fat content of a diet relates to cognitive flexibility. They found that diets with high amounts of either led to a decline in cognitive function. "This effect was most serious on the high-sugar diet, which also showed an impairment of early learning for both long-term and short-term memory." After four weeks on a high-fat or high-sugar diet, the performance of mice on various mental and physical tests started dropping. One of the scientists, Kathy Magnusson, said, "We've known for a while that too much fat and sugar are not good for you. This work suggests that fat and sugar are altering your healthy bacterial systems, and that's one of the reasons those foods aren't good for you. It's not just the food that could be influencing your brain, but an interaction between the food and microbial changes."