Did it as a student job for 3 years. I was paid roughly 50% more than with all other student jobs.
Honestly collecting garbage is not even that bad. I got paid to do fitness all day, spending time outside while chatting with my coworker. The people sorting the trash, that was who we felt bad for. They had all the downsides of the job with none of the benefits.
Compiler optimizations like function inlining are your friend.
Especially in functional languages, there are a lot of tricks a compiler can use to output more efficient code due to not needing to worry about possible side effects.
Also, in a lot of cases the performance difference does not matter.