To learn to code you don't need performance, you can use almost anything that will run your OS.
Speed isn't important but it is nice to have, particularly if you run simulations to test your code, the faster it is the more like 'real time' it will behave.
if you are coding high resolution live video or animated graphics you do need the speed and resources but that is a very advanced programming that few of us can manage. I'm really speaking for myself with 45 years of programming behind me and I wouldn't have confidence to take on a task like that! Start with the basics on a basic machine and preferably try to code in C or C++ or maybe Python, Rust or Ruby until you are confident about how software and hardware interact with each other.
Brian.