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.

Authors

Institutions

Publication Details

Journal
Konya Journal of Engineering Sciences
Published
2026-12-03
DOI
https://doi.org/10.36306/konjes.1889682
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

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

Arafat Şentürk, Abdullah Talha Kabakuş
Konya Journal of Engineering Sciences
Software Engineering Research
article

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

Arafat Şentürk, Abdullah Talha Kabakuş
article en

Abstract

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.

Konya Journal of Engineering SciencesVol. 14(4)
Düzce Üniversitesi (TR)
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon