Complex carbohydrates, rather than simple sugars, are the best because they are slower digesting so release the sugars in a steadier stream. For anything with high simple sugar content, you also want a high fiber content to slow the digestion of the sugar. Otherwise you get a sugar high soon followed by an insulin rush which lowers the blood sugar.

I've seen this happen; I actually made it up a 3,000 foot climb to a pass faster than a tall skinny mountaineer who was relying on candy and had to stop to eat more every 20-30 minutes. I was doing the tortoise routine (slow and steady). He would pass me at about double my speed, but when he stopped for more candy I would pass him. He had to stop again just before the top, while I was speeding up a bit because I knew we were just about there.

That yo-yo effect has been cited as a causation factor for Type 2 diabetes.
_________________________
May your trails be crooked, winding, lonesome, dangerous, leading to the most amazing view--E. Abbey