I use the AVE (High Speed Rail) from Barcelona to Madrid regularly. Prefer it to flying. There are more trains than ever, some make very few stops.
Tip: Book your AVE ticket on line (
www.renfe.com) 61 days prior to travel. Renfe offers very cheap tickets at a "Web" price... but this price sells out very quickly and you can't do it any earlier than 61 days.
Also, don't forget to take the printout of your ticket. You won't get on without it.