It isn’t about how fast they can code. In most of the cases, bad developers are faster.
Eventually, both will get the job done. The big difference is what happens next. The new feature is now in production, users are enjoying it, they provide valuable feedback… and now is time to improve it.
If the good developer built the feature, anyone in your team, any newcomer, can read the code and make changes, reasonably quickly. They can actually focus on improving the functionality.
If the bad developer coded the feature, no one by this developer would be able to improve it. If other peers attempt to do so, they will spend the majority of the time understanding, refactoring and cleaning the code, and you will often hear something like “we need to refactor this.”
A good developer will produce code that will pay off forever, would be there, no one will need to touch it, you can build on the top of it. A bad developer will create technical debt and frustrated developers.