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 条
  • [31] HIGMAN,B - A COMPARATIVE STUDY OF PROGRAMMING LANGUAGES
    WILKES, MV
    CONTROL, 1967, 11 (113): : 555 - +
  • [32] Programming languages for generative design: A comparative study
    Leitão, A. (antonio.menezes.leitao@ist.utl.pt), 1600, Multi-Science Publishing Co. Ltd (10):
  • [33] A comparative study of intrinsic parallel programming methodologies
    González-Vélez, H
    de Luca, A
    González-Vélez, V
    2004 1ST INTERNATIONAL CONFERENCE ON ELECTRICAL AND ELECTRONICS ENGINEERING (ICEEE), 2004, : 200 - 205
  • [34] Performance of ChatGPT-3.5 and ChatGPT-4 in the Taiwan National Pharmacist Licensing Examination: Comparative Evaluation Study
    Wang, Ying-Mei
    Shen, Hung-Wei
    Chen, Tzeng-Ji
    Chiang, Shu-Chiung
    Lin, Ting-Guan
    JMIR MEDICAL EDUCATION, 2025, 11
  • [35] Assessing ChatGPT-3.5 Versus ChatGPT-4 Performance in Surgical Treatment of Retinal Diseases: A Comparative Study
    Momenaei, Bita
    Wakabayashi, Taku
    Shahlaee, Abtin
    Durrani, Asad F.
    Pandit, Saagar A.
    Wang, Kristine
    Mansour, Hana A.
    Abishek, Robert M.
    Xu, David
    Sridhar, Jayanth
    Yonekawa, Yoshihiro
    Kuriyan, Ajay E.
    OPHTHALMIC SURGERY LASERS & IMAGING RETINA, 2024, 55 (08): : 481 - 482
  • [36] Programming education with ChatGPT: outcomes for beginners and intermediate students
    Suh, Jihae
    Lee, Kyuhan
    Lee, Jaehwan
    EDUCATION AND INFORMATION TECHNOLOGIES, 2025,
  • [37] Does ChatGPT Help With Introductory Programming? An Experiment of Students Using ChatGPT in CS1
    Xue, Yuankai
    Chen, Hanlin
    Bai, Gina R.
    Tairas, Robert
    Huang, Yu
    2024 ACM/IEEE 44TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: SOFTWARE ENGINEERING EDUCATION AND TRAINING, ICSE-SEET 2024, 2024, : 331 - 341
  • [38] Guidelines for Effective Use of ChatGPT in Introductory Programming Education
    Ramabu, Tlou
    Malebane, Tumelo
    2024 IST-AFRICA CONFERENCE, 2024,
  • [39] Programming with ChatGPT: How far can we go?
    Bucaioni, Alessio
    Ekedahl, Hampus
    Helander, Vilma
    Nguyen, Phuong T.
    MACHINE LEARNING WITH APPLICATIONS, 2024, 15
  • [40] Evolution of Healthcare with ChatGPT: A Word of Caution
    Sajjad, Mariam
    Saleem, Rida
    ANNALS OF BIOMEDICAL ENGINEERING, 2023, 51 (08) : 1663 - 1664