Xcode has constantly been slow and I have been looking at how to fix it but no solutions for it, to compile a 'print("Hello World")' in Playgrounds would take over 10 minutes and would crash, I don't have any 3rd party plugins. I use a Mid-2012 13" MacBook Pro 4GB RAM, i5.
Is there any way for me to delete all that Xcode has created and basically factory reset it so it could hopefully work?
Please try to clear derived data and try to run your code. Follow the following steps for that.