https://studentaid.ed.gov/sa/types/loans/interest-rates indicates direct undergrad loans are currently at 3.76%. At that rate, you're best off paying as slowly as possible and putting the rest of the money into an index fund.
Perhaps it shifted a lot in the last few years. I went back to school to get an EE degree, and it's mostly pretty high interest. Sadly I was pretty financially ignorant until maybe my senior year of my second degree. Plus since I was older, and already had a degree, the amount of money available goes down a lot. I don't know how much that effected my interest rates (though my private education loans were at 10% if you can believe it).