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 条
  • [1] ChatGPT versus Bard: A comparative study
    Ahmed, Imtiaz
    Kajol, Mashrafi
    Hasan, Uzma
    Datta, Partha Protim
    Roy, Ayon
    Reza, Md. Rokonuzzaman
    ENGINEERING REPORTS, 2024, 6 (11)
  • [2] Evaluating the performance of ChatGPT in clinical pharmacy: A comparative study of ChatGPT and clinical pharmacists
    Huang, Xiaoru
    Estau, Dannya
    Liu, Xuening
    Yu, Yang
    Qin, Jiguang
    Li, Zijian
    BRITISH JOURNAL OF CLINICAL PHARMACOLOGY, 2024, 90 (01) : 232 - 238
  • [3] A COMPARATIVE MULTIOBJECTIVE PROGRAMMING STUDY
    MOTE, J
    OLSON, DL
    VENKATARAMANAN, MA
    MATHEMATICAL AND COMPUTER MODELLING, 1988, 10 (10) : 719 - 729
  • [4] ChatGPT in Occupational Medicine: A Comparative Study with Human Experts
    Padovan, Martina
    Cosci, Bianca
    Petillo, Armando
    Nerli, Gianluca
    Porciatti, Francesco
    Scarinci, Sergio
    Carlucci, Francesco
    Dell'Amico, Letizia
    Meliani, Niccolo
    Necciari, Gabriele
    Lucisano, Vincenzo Carmelo
    Marino, Riccardo
    Foddis, Rudy
    Palla, Alessandro
    BIOENGINEERING-BASEL, 2024, 11 (01):
  • [5] Biochemical genetics decoded: A comparative study of ChatGPT and IEMbase
    Zapata, Laura Forero
    Cowan, Tina
    MOLECULAR GENETICS AND METABOLISM, 2024, 141 (04)
  • [6] Efficacy of ChatGPT in Cantonese Sentiment Analysis: Comparative Study
    Fu, Ziru
    Hsu, Yu Cheng
    Chan, Christian S.
    Lau, Chaak Ming
    Liu, Joyce
    Yip, Paul Siu Fai
    JOURNAL OF MEDICAL INTERNET RESEARCH, 2024, 26
  • [7] ChatGPT: evolution or revolution?
    Bert Gordijn
    Henk ten Have
    Medicine, Health Care and Philosophy, 2023, 26 : 1 - 2
  • [8] ChatGPT: evolution or revolution?
    Gordijn, Bert
    ten Have, Henk
    MEDICINE HEALTH CARE AND PHILOSOPHY, 2023, 26 (01) : 1 - 2
  • [9] Java']Java Web Programming with ChatGPT
    Guo, Muhan
    2024 5TH INTERNATIONAL CONFERENCE ON MECHATRONICS TECHNOLOGY AND INTELLIGENT MANUFACTURING, ICMTIM 2024, 2024, : 834 - 838
  • [10] ChatGPT in a programming course: benefits and limitations
    Bringula, Rex
    FRONTIERS IN EDUCATION, 2024, 9