Prompt Engineering of ChatGPT to Improve Generated Code & Runtime Performance Compared with the Top-Voted Human Solutions
This paper presents the results of a study comparing the runtime performance of the best performing coding solution selected from 100 solutions generated with ChatGPT to the top-voted human-produced code on Stack Overflow. These results show that selecting from the best of 100 solutions generated by ChatGPT is competitive or better than the top voted human solution on Stack Overflow for the range of problems that we tested. Moreover, the results indicate that prompting multiple times for code and selecting the best of many generated solutions is a promising autonomous cod ing aid to help human software engineers find the best solu tions for performance-critical code sections.