CodegenBench: Can LLMs Write Efficient Code Across Architectures?

matt_d1 pts0 comments

[2606.04023] CodegenBench: Can LLMs Write Efficient Code Across Architectures?

-->

Computer Science > Software Engineering

arXiv:2606.04023 (cs)

[Submitted on 1 Jun 2026]

Title:CodegenBench: Can LLMs Write Efficient Code Across Architectures?

Authors:Jie Li, Wenzhao Wu, Junqi Hu, Qinrui Zheng, Bowen Wu, Juepeng Zheng, Yutong Lu, Haohuan Fu<br>View a PDF of the paper titled CodegenBench: Can LLMs Write Efficient Code Across Architectures?, by Jie Li and 7 other authors

View PDF<br>HTML (experimental)

Abstract:While large language models (LLMs) have been extensively evaluated on code generation tasks for general-purpose programming and GPU-accelerated environments (e.g., PyTorch, CUDA), their capabilities in CPU-oriented high-performance computing (HPC) across diverse architectures remain underexplored. To bridge this gap, we introduce CodegenBench, a comprehensive benchmark suite designed to evaluate the generation of efficient parallel code across three distinct hardware platforms: x86_64, Sunway, and Kunpeng. Our benchmark comprises 106 standard Basic Linear Algebra Subprograms (BLAS) routines establishing a fundamental baseline, alongside 20 specialized computational kernels adapted for each of the unique supercomputing architectures (LeetSunway and LeetKunpeng). Our extensive evaluation reveals that while state-of-the-art LLMs can generate optimized code for ubiquitous architectures like x86_64, they exhibit significant performance degradation on domain-specific architectures with limited public documentation and training data, highlighting critical limitations in cross-platform generalization. Furthermore, our analysis of factors influencing code quality such as implementation length and task complexity indicates that current LLMs are most effective for moderately difficult problems requiring concise code snippets. We open-source our dataset and automated evaluation infrastructure to facilitate future research in LLM-driven high-performance code generation. The resources are available at this https URL and this https URL.

Comments:<br>29 pages, 22 figures

Subjects:

Software Engineering (cs.SE); Artificial Intelligence (cs.AI)

Cite as:<br>arXiv:2606.04023 [cs.SE]

(or<br>arXiv:2606.04023v1 [cs.SE] for this version)

https://doi.org/10.48550/arXiv.2606.04023

Focus to learn more

arXiv-issued DOI via DataCite

Submission history<br>From: Jie Li [view email]<br>[v1]<br>Mon, 1 Jun 2026 12:55:10 UTC (2,101 KB)

Full-text links:<br>Access Paper:

View a PDF of the paper titled CodegenBench: Can LLMs Write Efficient Code Across Architectures?, by Jie Li and 7 other authors<br>View PDF<br>HTML (experimental)<br>TeX Source

view license

Current browse context:

cs.SE

next >

new<br>recent<br>| 2026-06

Change to browse by:

cs<br>cs.AI

References & Citations

NASA ADS<br>Google Scholar

Semantic Scholar

export BibTeX citation<br>Loading...

BibTeX formatted citation

&times;

loading...

Data provided by:

Bookmark

Bibliographic Tools

Bibliographic and Citation Tools

Bibliographic Explorer Toggle

Bibliographic Explorer (What is the Explorer?)

Connected Papers Toggle

Connected Papers (What is Connected Papers?)

Litmaps Toggle

Litmaps (What is Litmaps?)

scite.ai Toggle

scite Smart Citations (What are Smart Citations?)

Code, Data, Media

Code, Data and Media Associated with this Article

alphaXiv Toggle

alphaXiv (What is alphaXiv?)

Links to Code Toggle

CatalyzeX Code Finder for Papers (What is CatalyzeX?)

DagsHub Toggle

DagsHub (What is DagsHub?)

GotitPub Toggle

Gotit.pub (What is GotitPub?)

Huggingface Toggle

Hugging Face (What is Huggingface?)

ScienceCast Toggle

ScienceCast (What is ScienceCast?)

Demos

Demos

Replicate Toggle

Replicate (What is Replicate?)

Spaces Toggle

Hugging Face Spaces (What is Spaces?)

Spaces Toggle

TXYZ.AI (What is TXYZ.AI?)

Related Papers

Recommenders and Search Tools

Link to Influence Flower

Influence Flower (What are Influence Flowers?)

Core recommender toggle

CORE Recommender (What is CORE?)

Author

Venue

Institution

Topic

About arXivLabs

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs .

Which authors of this paper are endorsers? |<br>Disable MathJax (What is MathJax?)

code toggle architectures llms arxiv across

Related Articles