This study evaluates the efficiency of code generation by Large Language Models (LLMs) and measures their performance against human-crafted solutions using a dataset from Leetcode. We compare 18 LLMs, considering factors such as model temperature and success rate, and their impact on code performance. The research introduces a novel method for measuring and comparing the speed of LLM- generated code, revealing that LLMs produce code with comparable performance, irrespective of the model used. We also find that LLMs are capable of generating code that is, on average, more efficient than the code written by humans. The paper further discusses the use of Leetcode as a benchmarking dataset, the limitations imposed by potential data contamination, and the platform’s measurement reliability. Our findings contribute to a better understanding of LLM capabilities in code generation and set the stage for future optimizations in the field.