I wonder how hard it would be to mine an asteroid, and then send the refined materials back to Earth from the asteroid belt. Sure, the initial trip would take a while, but after the initial package you could just keep shipping them every few weeks for a consistent supply.
I assume you mean "on the moon or on earth" since you can't really mine in empty space. The process of either (without air, for a start) would make them so different as to be incomparable.
Mining on the moon would have so many expenses associated, that you could spend the same amount making earth-based processes cleaner. The issue is that it's economical not to do so, so earth processes are dirty by design and due to lack of regulation.