I have a recurring disagreement with a programmer about code quality. He insists that all of his code is written to the highest standard (i.e. that it looks just like the examples in the coding styles textbooks), regardless of the impact this has on functionality. I, on the other hand, think it is more important that the code written meets the needs of the business - i.e. that it works efficiently, does not take too long to develop, and is reasonably maintainable.
We recently had an argument, where a specific script he has written looks great, is perfectly styled, and works exactly as the various books describe as best practice. I have an alternate version, which has been written using a so-called "anti-pattern", and which he insists is absolutely terrible code that should never be used. However, it also happens to run approximately five times as fast.
I have been trying to convince him that he needs to use this anti-pattern, even if it is "bad code", because running quickly is more important than looking nice. He disagrees, and has point blank refused to consider writing any code that does not conform to the recognized "good" style patterns, even if this means it takes longer to write and does not perform as well.
Example case: He wants to use an ORM to access the database. For one particularly complicated query, the ORM does not optimize it well, and it takes more than 4 hours to run. I inserted some raw SQL directly, and reduced the execution time to under 30 seconds. He objected - very strongly - saying that writing raw sql queries directly is bad practice, and we should always use the ORM. Now he refuses to work on that part of the program.
I have tried to explain that having a program that works well is more important than having code that looks nice, but he just says "no it's not" and carries on writing his stylish, inefficient, code, which I then sometimes have to rewrite badly before it can be used.
At the moment, we are in a bad position, because he refuses to compromise his standards, which means that everything he does has to be checked over by me and in some cases modified to be sure that it meets the needs of the business, and not just his aesthetic standards.
How can I convince him to reprioritize, and put the objectives of the business ahead of the prettyness of his code?
Edit: Stephan Kolassa suggested I include this: I am technically his manager, but we're such a small company (~10 ppl) that I also program, and so am sort of his peer at the same time, which just makes it a little more complicated, and we don't have any fixed organizational standards or conflict resolution procedures.