Not too well, it turns out.
One researcher explained that "[The students'] brain cells had trouble signaling each other, disrupting the [students']' ability to think clearly and recall the route they'd learned six weeks earlier." She added, "Our study shows that a high-fructose diet harms the brain as well as the body. This is something new." High-fructose corn syrup is commonly found in soda, condiments, applesauce, baby food and other processed snacks."*
OK, obviously the study was done on rats, not people. To be fair, the researcher said, "the study did not say what the equivalent might be for a human to consume as much high-fructose corn syrup as the rats did." Still, the whole thing does seem to ring true to what Ellen White wrote: "Sugar . . . . clouds the brain" (Counsels on Diet and Foods, p. 327).
Something to think about, assuming you didn't just eat a candy bar and you have a cloudy brain.