My colleague and I both work for a small startup. We have been both allocated different sections of the product to work on, with different areas of expertise. We both have the same boss (the company owner).
Last week he was tasked with creating some code for me to use. While I was waiting for him to deliver me his part for integration into my code, I generated some stand-in code to use in the meantime so I could continue with my work. I didn't write the code. It was generated using a MATLAB tool, and I just inserted the parameters.
When he sent through his final code, I saw that my MATLAB-generated code was vastly superior. He also used MATLAB to generate his results, but he used a different tool with different parameters.
I was under the impression that he would generate these results 'by hand' instead of using the MATLAB generator. I just used the generator as a quick fix while I waited for him to be done.
I don't really know what to do. I didn't intend to do his work for him, and I didn't really (I wouldn't be able to do this by hand in any case!). I don't want him to feel like I'm stepping on his toes. Yet at the same time there is a vast improvement in results between mine and his (that is quantifiable). I also don't want to use inferior code when I know that a better performing one is available.
I want to clear this up and talk to someone about it, but I don't know how to approach the topic without coming across as a bad team player, or trying to sabotage my colleague's work, or anything like that. How do I talk to him about it? Or do I bring it up with our boss?