Home > Published Issues > 2026 > Volume 15, No. 1, January 2026 >
IJEETC 2026 Vol.15(1): 19-28
doi: 10.18178/ijeetc.15.1.19-28

Code Generation by Large Language Models: A Comparative Analysis of ChatGPT, Claude, and DeepSeek

Yousef Alraba’nah1,2,*, Azzam Sleit2, Iyas Qaddara3, and Mohammad Hiari4
1. Department of Software Engineering, Al-Ahliyya Amman University, Amman, Jordan
2. Department of Computer Science, University of Jordan, Amman, Jordan
3. Department of Computer Science, Al-Ahliyya Amman University, Amman, Jordan
4. Department of Networks and Cybersecurity, Al-Ahliyya Amman University, Amman, Jordan
Email: y.alrabanah@ammanu.edu.jo (Y.A.), azzam.sleit@ju.edu.jo (A.S.), i.qaddara@ammanu.edu.jo (I.Q.), m.hyari@ammanu.edu.jo (M.H.)
*Corresponding author

Manuscript received September 4, 2025; revised October 18, 2025; accepted October 22, 2025

Abstract—As generative Artificial Intelligence (AI) models become increasingly integrated into software development workflows, understanding their efficiency and code quality is critical. This study offers a comprehensive comparison of three leading AI models—ChatGPT GPT-4-turbo, Claude Sonnet, and DeepSeek-V3—for automated code generation, focusing specifically on sorting algorithms. The models are evaluated across multiple metrics including execution time, memory usage, peak memory consumption, logical and physical file sizes, and code readability. Python implementations of Insertion Sort, Merge Sort, Quick Sort, and Heap Sort are generated by each model and benchmarked in a consistent Linux Docker environment. Results reveal that ChatGPT leads in overall efficiency, with the fastest average execution time, the lowest peak memory usage, and the highest readability scores. DeepSeek demonstrated competitive performance, especially in producing readable code, while Claude showed higher memory consumption and lower readability. This analysis provides practical insight into the trade-offs between code quality and system performance in AI-generated programming, offering valuable guidance for researchers and developers alike.

 
Index Terms—ChatGPT, Claude sonnet, code generation, DeepSeek, large language model

Cite: Yousef Alraba’nah, Azzam Sleit, Iyas Qaddara, and Mohammad Hiari, "Code Generation by Large Language Models: A Comparative Analysis of ChatGPT, Claude, and DeepSeek," International Journal of Electrical and Electronic Engineering & Telecommunications, vol. 15, no. 1, pp. 19-28, 2026. doi: 10.18178/ijeetc.15.1.19-28

Copyright © 2026 by the authors. This is an open access article distributed under the Creative Commons Attribution License (CC BY 4.0), which permits use, distribution and reproduction in any medium, provided that the article is properly cited, the use is non-commercial and no modifications or adaptations are made.

Article Metrics in Dimensions