Pasta sounds like highly theoretical food for a hike. I have yet to see anyone who would carry pasta or similar food for a hike as main source of calories. Sounds impractical and waste of space. Or raw butter which would melt in the heat. Also, eating 300g of butter as energy source for whole day sounds like one of those things that makes your stomach go real bad.
Quick energy in sugary food weights a little and comes in gazimilion sources. Proteins bars or dry meant are easy to get, weight a little and have enough calories. Both are slow calories.
But besides, already traditional bread and ham or sausage or bacon or whatever are good enough for day hike. Or any kind of already cooked meat that can survive a day. You do not need more for one day. For more days, you need to consider more then just calories in the thing. Which where pasta like food or canned food comes into play - people carry it because they want real food to actually fills stomach and comfort of it, not because they would worry about being unable to fill calories. Besides, you can hike on caloric deficit.
Carrying 1.5kg of butter as primary source of food for 5 days hike sounds like one of those things that gets hikes cancelled second day and someone needing help to get back.