Ubuntu 18.04 runs slowly on Mac

I've recently installed Ubuntu on my 2008 Macbook, which runs very slowly. In fact, it took 4 minutes and 6 seconds to reach the login screen and a minute to reach the home screen. Can I solve this problem or should I simply switch to distribution?