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 条
  • [41] Students’ Experiences of Using ChatGPT in an Undergraduate Programming Course
    Haindl, Philipp
    Weinberger, Gerald
    IEEE ACCESS, 2024, 12 : 43519 - 43529
  • [42] ChatGPT: Challenges and Benefits in Software Programming for Higher Education
    da Silva, Carlos Alexandre Gouvea
    Ramos, Felipe Negrelle
    de Moraes, Rafael Veiga
    dos Santos, Edson Leonardo
    SUSTAINABILITY, 2024, 16 (03)
  • [43] Evolution of Healthcare with ChatGPT: A Word of Caution
    Mariam Sajjad
    Rida Saleem
    Annals of Biomedical Engineering, 2023, 51 : 1663 - 1664
  • [44] ChatGPT and finetuned BERT: A comparative study for developing intelligent design support systems
    Qiu, Yunjian
    Jin, Yan
    Intelligent Systems with Applications, 2024, 21
  • [45] Evaluating the Performance of ChatGPT in Urology: A Comparative Study of Knowledge Interpretation and Patient Guidance
    Sahin, Bahadir
    Genc, Yunus Emre
    Dogan, Kader
    Sener, Tarik Emre
    Sekerci, Cagri Akin
    Tanidir, Yiloeren
    Yuecel, Selcuk
    Tarcan, Tufan
    Cam, Haydar Kamil
    JOURNAL OF ENDOUROLOGY, 2024, 38 (08) : 799 - 808
  • [46] AI in Dental Radiology-Improving the Efficiency of Reporting With ChatGPT: Comparative Study
    Stephan, Daniel
    Bertsch, Annika
    Burwinkel, Matthias
    Vinayahalingam, Shankeeth
    Al-Nawas, Bilal
    Kaemmerer, Peer
    Thiem, Daniel G. E.
    JOURNAL OF MEDICAL INTERNET RESEARCH, 2024, 26
  • [47] The Utility of ChatGPT in Diabetic Retinopathy Risk Assessment: A Comparative Study with Clinical Diagnosis
    Raghu, Keerthana
    Tamilselvi, S.
    Devishamani, Chitralekha S.
    Suchetha, M.
    Rajalakshmi, Ramachandran
    Raman, Rajiv
    CLINICAL OPHTHALMOLOGY, 2023, 17 : 4021 - 4031
  • [48] Evaluating LLMs for Code Generation in HRI: A Comparative Study of ChatGPT, Gemini, and Claude
    Sobo, Andrei
    Mubarak, Awes
    Baimagambetov, Almas
    Polatidis, Nikolaos
    APPLIED ARTIFICIAL INTELLIGENCE, 2025, 39 (01)
  • [49] Enhancing Programming Education with ChatGPT: A Case Study on Student Perceptions and Interactions in a Python']Python Course
    Mal, Boxuan
    Chen, Li
    Konomi, Shin'ichi
    ARTIFICIAL INTELLIGENCE IN EDUCATION: POSTERS AND LATE BREAKING RESULTS, WORKSHOPS AND TUTORIALS, INDUSTRY AND INNOVATION TRACKS, PRACTITIONERS, DOCTORAL CONSORTIUM AND BLUE SKY, AIED 2024, PT I, 2024, 2150 : 113 - 126
  • [50] ChatGPT Solving Complex Kidney Transplant Cases: A Comparative Study With Human Respondents
    Mankowski, Michal A.
    Jaffe, Ian S.
    Xu, Jingzhi
    Bae, Sunjae
    Oermann, Eric K.
    Aphinyanaphongs, Yindalon
    McAdams-DeMarco, Mara A.
    Lonze, Bonnie E.
    Orandi, Babak J.
    Stewart, Darren
    Levan, Macey
    Massie, Allan
    Gentry, Sommer
    Segev, Dorry L.
    CLINICAL TRANSPLANTATION, 2024, 38 (10)