All things being equal, with the same amount of sugars and fats given in a recipe, sweet potatoes are a bit more nutrient-dense, as they're loaded with vitamin A and fiber. However, pumpkins tend to be lighter and lower in sugar content.