The evolution of ChatGPT for programming: a comparative study

被引:0
|
作者
Jain, Rushabh [1 ]
Thanvi, Jyoti [2 ]
Subasinghe, Akila [2 ]
机构
[1] Dubai Coll, Dubai, U Arab Emirates
[2] Univ Birmingham, Birmingham, England
来源
ENGINEERING RESEARCH EXPRESS | 2025年 / 7卷 / 01期
关键词
programming; generative AI; chatgpt;
D O I
10.1088/2631-8695/ada51d
中图分类号
T [工业技术];
学科分类号
08 ;
摘要
The introduction of Transformer models has significantly advanced natural language processing, with the development of Large Language Models (LLMs) like GPT-4 and Gemini revolutionizing industries by automating programming tasks. However, challenges remain regarding their ability to fully replace human programmers, especially in terms of efficiency and handling complex problems. This study aims to evaluate the performance of GPT models in solving algorithmic problems across three programming languages-Python, Java, and C++. It focuses on assessing runtime and memory efficiency to provide insights into the capabilities and limitations of LLMs in practical programming tasks. We selected 15 LeetCode problems categorized by difficulty and instructed GPT-3.5, GPT-4, and GPT-4o to generate solutions in Python, Java, and C++. Code was generated and executed 10 times for each problem, measuring runtime and memory usage. Statistical analyses, including two-way ANOVA and post hoc Tukey's HSD tests, were conducted to evaluate the results. The findings indicate that programming language has a significant effect on memory and runtime efficiency, with C++ outperforming Python and Java. However, there were no statistically significant differences in performance between GPT-3.5, GPT-4, and GPT-4o across most tasks. Python was found to be significantly slower and more memory-intensive compared to C++ and Java. While GPT models show promise in assisting with programming tasks, their practical utility remains limited, particularly for complex problems. Improvements in newer GPT models do not always translate into significant performance gains. The choice of programming language plays a crucial role in optimizing LLM-generated code, suggesting that LLMs are better suited for augmenting human programmers rather than replacing them in critical tasks.
引用
收藏
页数:12
相关论文
共 50 条
  • [21] Pair programming with ChatGPT for sampling and estimation of copulas
    Gorecki, Jan
    COMPUTATIONAL STATISTICS, 2024, 39 (06) : 3231 - 3261
  • [22] USING CHATGPT IN DISTANCE LEARNING FOR BEGINNERS IN PROGRAMMING
    Sisilitsyn, Yurii O.
    V. Osadchyi, Viacheslav
    INFORMATION TECHNOLOGIES AND LEARNING TOOLS, 2023, 97 (05) : 167 - 180
  • [23] Would ChatGPT-facilitated programming mode impact college students' programming behaviors, performances, and perceptions? An empirical study
    Sun, Dan
    Boudouaia, Azzeddine
    Zhu, Chengcong
    Li, Yan
    INTERNATIONAL JOURNAL OF EDUCATIONAL TECHNOLOGY IN HIGHER EDUCATION, 2024, 21 (01)
  • [24] Evaluating Literature Reviews Conducted by Humans Versus ChatGPT: Comparative Study
    Mostafapour, Mehrnaz
    Fortier, Jacqueline H.
    Pacheco, Karen
    Murray, Heather
    Garber, Gary
    JMIR AI, 2024, 3
  • [25] Would ChatGPT-facilitated programming mode impact college students’ programming behaviors, performances, and perceptions? An empirical study
    Dan Sun
    Azzeddine Boudouaia
    Chengcong Zhu
    Yan Li
    International Journal of Educational Technology in Higher Education, 21
  • [26] Programming Languages For Generative Design: A Comparative Study
    Leitao, Antonio
    Santos, Luis
    Lopes, Jose
    INTERNATIONAL JOURNAL OF ARCHITECTURAL COMPUTING, 2012, 10 (01) : 140 - 162
  • [27] A Comparative Study on Crossover in Cartesian Genetic Programming
    Husa, Jakub
    Kalkreuth, Roman
    GENETIC PROGRAMMING (EUROGP 2018), 2018, 10781 : 203 - 219
  • [28] A comparative study of language support for generic programming
    Garcia, R
    Järvi, J
    Lumsdaine, A
    Siek, J
    Willcock, J
    ACM SIGPLAN NOTICES, 2003, 38 (11) : 115 - 134
  • [29] COMPARATIVE STUDY OF PROGRAMMING LANGUAGES - HIGMAN,B
    不详
    AMERICAN DOCUMENTATION, 1969, 20 (02): : 175 - 175
  • [30] A Comparative Study of Programming Languages in Rosetta Code
    Nanz, Sebastian
    Furia, Carlo A.
    2015 IEEE/ACM 37TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, VOL 1, 2015, : 778 - 788