Skip to main navigation Skip to search Skip to main content

On Evaluating the Efficiency of Source Code Generated by LLMs

  • Changan Niu
  • , Ting Zhang
  • , Chuanyi Li
  • , Bin Luo
  • , Vincent Ng

Research output: Chapter in Book/Report/Conference proceedingConference PaperResearchpeer-review

Abstract

Recent years have seen the remarkable capabilities of large language models (LLMs) for code generation. Different from existing work that evaluate the correctness of the code generated by LLMs, we propose to further evaluate its efficiency. More efficient code can lead to higher performance and execution efficiency of programs and software completed by LLM-assisted programming. First, we evaluate the efficiency of the code generated by LLMs on two benchmarks, HumanEval and MBPP. Then, we choose a set of programming problems from the online judge platform LeetCode to conduct a more difficult evaluation. Finally, we explore several prompts that would enable LLMs to generate more efficient code.

Original languageEnglish
Title of host publicationProceedings - 2024 IEEE/ACM 1st International Conference on AI Foundation Models and Software Engineering, FORGE 2024
EditorsMassimiliano Di Penta, Xing Hu
Place of PublicationNew York NY USA
PublisherAssociation for Computing Machinery (ACM)
Pages103-107
Number of pages5
ISBN (Electronic)9798400706097
DOIs
Publication statusPublished - 2024
Externally publishedYes
EventIEEE/ACM International Conference on AI Foundation Models and Software Engineering 2024 - Lisbon, Portugal
Duration: 14 Apr 202414 Apr 2024
Conference number: 1st
https://dl.acm.org/doi/proceedings/10.1145/3650105 (Proceedings)
https://conf.researchr.org/home/forge-2024 (Website)

Conference

ConferenceIEEE/ACM International Conference on AI Foundation Models and Software Engineering 2024
Abbreviated titleFORGE 2024
Country/TerritoryPortugal
CityLisbon
Period14/04/2414/04/24
Otherco-located with the 46th ACM/IEEE International Conference on Software Engineering, ICSE 2024
Internet address

Cite this