If you like the OSX UI, and your chief complaint is speed and price, I'm afraid you'll have to reach into your pocket deeper, and upgrade the hardware. You're not going to like the Linux landscape.
I say this as someone who used linux since 1996, exclusively (except for gaming), both at home, and at work, for coding and everything else I do on a computer. But I also hate the OSX UI with a passion, so I'm happy with what I was able to do with my Debian. If you are willing to customise the experience to your liking, and perhaps adapt to the OS, Linux may be a viable choice. But if your only complaint about OSX is the lag on older HW... I do not think it is a good idea to switch.
What you can try, however, is Linux in a VM. Put it in full screen, and see if you can use it. Give it all the resources you can, and run only the VM. It will be slower than on real hardware, yeah, but for a vast majority of coding tasks, it is perfectly acceptable - a lot of my friends work in a similar setup. If you end up liking it, THEN switch.