EVALUATING OPEN-SOURCE LARGE LANGUAGE MODELS ON PYTHON AND C++ CODE GENERATION

This study presents a comprehensive evaluation of a total of eight widely used open-source Large Language Models (LLMs) in code generation across the two most popular programming languages: Python and C++. Utilizing the gold standard HumanEval benchmark, we assess model performance across four core categories: Algorithms, Data Structures, Mathematics and Logic, and String Processing. In addition to evaluating correctness based on test case pass rates, we also measure the time required to generate code for each prompt, providing a dual perspective on accuracy and efficiency. Our results show that Python consistently outperforms C++ in terms of generation success across all categories, with particularly strong performance in mathematical reasoning tasks. Among all evaluated models, Gemma3:27b achieved the highest overall accuracy in both Python and C++, highlighting its superior generalization capabilities. To identify performance boundaries, we isolate the ten easiest and ten most challenging tasks, revealing that LLMs perform best on well-scoped, syntactically simple problems and struggle with nested logic, grid-based reasoning, and recursive control flow. Through detailed heatmaps and task-level visualizations, we offer actionable insights into current LLM capabilities and limitations, with implications for future model training, prompt engineering, and deployment in educational and industrial settings. To our knowledge, this study provides the first systematic comparison of Python versus C++ code generation across eight open-source LLMs using a dual-metric and taxonomy-guided evaluation framework.

Link
https://doi.org/10.36306/konjes.1889682
Found by
Crossref
Authors
Abdullah Talha Kabakuş, Arafat Şentürk
Organizations
DUZCE UNIVERSITY, DÜZCE ÜNİVERSİTESİ
Categories
benchmark, evaluation
Published
2026-12-03
Last seen by the radar
2026-12-04
Citations
0
Radar score
43.14 / 100 (how it is scored)
Why it scored so
Matched: benchmark, evaluat; Primary record: Crossref
Is this record right? If you made this work and something here is wrong or missing, tell us what to fix.

More records found by Crossref