Bicycle racers in long events such as the Tour de France take sugar supplements while they ride to increase their endurance. If you plan to exercise for more than two hours, you can help yourself last longer by taking a source of sugar after 30 minutes and several times more throughout your event.
When you exercise, you convert food to energy for your muscles by stripping off electrons and hydrogen from the foodstuffs. This process manufactures a chemical called ATP that provides energy that does not require oxygen. A study from the University of Waterloo in Ontario, Canada shows that taking sugar during prolonged exercise raises levels of ATP. At exhaustion, ATP levels were at the same low levels in both the group taking sugar and those taking artificial sweeteners. However, prior to exhaustion, those taking sugar had higher levels to help them exercise longer. Journal reference
You do not get this benefit from sugar eaten before you exercise because high blood sugar levels that result will cause your pancreas to release large amounts of insulin. The extra insulin will deplete the sugar stored in your muscles faster and tire you earlier. Thus if you want to exercise intensely for more than a couple of hours, you need to eat or drink a source of carbohydrates at frequent intervals during your activity.