Datasets:

Modalities:
Tabular
Text
Formats:
parquet
Languages:
English
Size:
< 1K
ArXiv:
Tags:
code
Libraries:
Datasets
Dask
License:
File size: 9,343 Bytes
ef8fbb1
 
 
 
 
 
 
 
 
 
 
 
 
c414076
 
 
 
ef8fbb1
 
 
 
 
 
c414076
 
 
 
 
4e1298b
c414076
4e1298b
ef8fbb1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c414076
 
ef8fbb1
c414076
 
ef8fbb1
 
c414076
 
ef8fbb1
 
 
c414076
 
ef8fbb1
c414076
 
ef8fbb1
 
c414076
 
ef8fbb1
 
 
c414076
 
ef8fbb1
c414076
 
ef8fbb1
 
c414076
 
ef8fbb1
 
 
c414076
 
ef8fbb1
c414076
 
ef8fbb1
 
c414076
 
ef8fbb1
 
 
c414076
 
ef8fbb1
c414076
 
ef8fbb1
 
c414076
 
ef8fbb1
 
 
c414076
 
ef8fbb1
c414076
 
ef8fbb1
 
c414076
 
ef8fbb1
 
 
 
 
6ab2e7a
 
dad3c03
 
 
 
 
 
 
 
 
 
 
 
 
 
ef8fbb1
 
dad3c03
ef8fbb1
425b58a
dad3c03
ef8fbb1
 
 
 
 
ad970f4
 
 
 
 
 
 
 
 
 
ef8fbb1
ad970f4
 
49babbe
ad970f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49babbe
ad970f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49babbe
ad970f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
---
dataset_info:
  features:
  - name: id
    dtype: string
  - name: title
    dtype: string
  - name: title_slug
    dtype: string
  - name: description
    dtype: string
  - name: description_md
    dtype: string
  - name: difficulty
    dtype: string
  - name: tags
    list: string
  - name: source
    dtype: string
  - name: url
    dtype: string
  - name: type
    dtype: string
  - name: release_timestamp
    dtype: int64
  - name: release_date
    dtype: string
  - name: time_limit_nanos
    dtype: int64
  - name: memory_limit_bytes
    dtype: int64
  - name: starter_code
    struct:
    - name: c
      dtype: string
    - name: cpp
      dtype: string
    - name: csharp
      dtype: string
    - name: dart
      dtype: string
    - name: elixir
      dtype: string
    - name: erlang
      dtype: string
    - name: golang
      dtype: string
    - name: java
      dtype: string
    - name: javascript
      dtype: string
    - name: kotlin
      dtype: string
    - name: php
      dtype: string
    - name: python
      dtype: string
    - name: python3
      dtype: string
    - name: racket
      dtype: string
    - name: ruby
      dtype: string
    - name: rust
      dtype: string
    - name: scala
      dtype: string
    - name: swift
      dtype: string
    - name: typescript
      dtype: string
  - name: solutions
    struct:
    - name: cpp
      struct:
      - name: code
        dtype: string
      - name: memory
        dtype: int64
      - name: memoryDistribution
        dtype: string
      - name: runtime
        dtype: int64
      - name: runtimeDistribution
        dtype: string
    - name: golang
      struct:
      - name: code
        dtype: string
      - name: memory
        dtype: int64
      - name: memoryDistribution
        dtype: string
      - name: runtime
        dtype: int64
      - name: runtimeDistribution
        dtype: string
    - name: java
      struct:
      - name: code
        dtype: string
      - name: memory
        dtype: int64
      - name: memoryDistribution
        dtype: string
      - name: runtime
        dtype: int64
      - name: runtimeDistribution
        dtype: string
    - name: javascript
      struct:
      - name: code
        dtype: string
      - name: memory
        dtype: int64
      - name: memoryDistribution
        dtype: string
      - name: runtime
        dtype: int64
      - name: runtimeDistribution
        dtype: string
    - name: python3
      struct:
      - name: code
        dtype: string
      - name: memory
        dtype: int64
      - name: memoryDistribution
        dtype: string
      - name: runtime
        dtype: int64
      - name: runtimeDistribution
        dtype: string
    - name: ruby
      struct:
      - name: code
        dtype: string
      - name: memory
        dtype: int64
      - name: memoryDistribution
        dtype: string
      - name: runtime
        dtype: int64
      - name: runtimeDistribution
        dtype: string
  - name: test_case_generator
    dtype: string
  - name: evaluator
    dtype: string
  - name: generated_tests
    dtype: string
  - name: test_runners
    struct:
    - name: cpp
      dtype: string
    - name: golang
      dtype: string
    - name: java
      dtype: string
    - name: javascript
      dtype: string
    - name: python3
      dtype: string
    - name: ruby
      dtype: string
  splits:
  - name: test
    num_bytes: 3865548641
    num_examples: 623
  download_size: 2341977516
  dataset_size: 3865548641
configs:
- config_name: default
  data_files:
  - split: test
    path: data/test-*
license: apache-2.0
task_categories:
- question-answering
language:
- en
tags:
- code
pretty_name: EffiBench-X
size_categories:
- n<1K
---
# Dataset Card for EffiBench-X

**EffiBench-X** is the first multi-language benchmark designed specifically to evaluate the efficiency of LLM-generated code across six programming languages: Python, C++, Java, JavaScript, Ruby, and Golang. The dataset comprises 623 competitive programming problems paired with human expert solutions as efficiency baselines.

## Dataset Details

### Dataset Description

EffiBench-X addresses critical limitations in existing code generation benchmarks by providing:
- **Multi-language evaluation** across Python, C++, Java, JavaScript, Ruby, and Golang
- **Efficiency-focused metrics** including execution time, memory peak, and memory integral
- **Human expert baselines** for reliable efficiency comparison

- **Curated by:** Yuhao Qing, Boyu Zhu, Mingzhe Du, Zhijiang Guo, Terry Yue Zhuo, Qianru Zhang, Jie M. Zhang, Heming Cui, Siu-Ming Yiu, Dong Huang, See-Kiong Ng, Luu Anh Tuan
- **Institutions:** HKU, UCL, NTU, NUS, HKUST, Monash University, CSIRO's Data61, KCL
- **Language(s) (NLP):** English
- **License:** Apache License 2.0

### Dataset Sources

- **Repository:** [EffiBench-X (GitHub)](https://github.com/EffiBench/EffiBench-X)
- **Dataset:** [EffiBench/effibench-x](https://huggingface.co/datasets/EffiBench/effibench-x)
- **Paper:** [arXiv:2505.13004](https://arxiv.org/abs/2505.13004)
- **Problem Sources:** 
  - [LeetCode](https://leetcode.com)
  - [Aizu Online Judge](https://onlinejudge.u-aizu.ac.jp/)
  - [AtCoder](https://atcoder.jp)
  - [CodeChef](https://www.codechef.com)
  - [Codeforces](https://codeforces.com)

## Uses

### Direct Use

- **Benchmarking LLM code generation efficiency**: Evaluate models on runtime performance, memory usage, and correctness across multiple languages
- **Cross-language performance analysis**: Compare model capabilities across different programming paradigms
- **Model development**: Train and fine-tune models for efficient code generation
- **Research**: Study efficiency gaps between LLM-generated and human expert code

### Out-of-Scope Use

- **Production deployment without validation**: Solutions should be verified before production use
- **Security-critical applications**: The dataset focuses on algorithmic efficiency, not security
- **Non-competitive programming domains**: Problems are algorithmic in nature and may not represent all software engineering contexts

## Dataset Structure

The dataset contains 623 problems categorized into:
- **Functional problems**: Implement specific functions/classes with I/O handled by test templates
- **Standard I/O problems**: Complete programs reading from stdin and writing to stdout

Key fields per record include:

- `id`, `title`, `title_slug`, `description`, `description_md`, `difficulty`, `tags`, `source`, `url`, `type`
- Limits: `time_limit_nanos`, `memory_limit_bytes`
- Code artifacts:
  - `starter_code`: language-keyed starter snippets
  - `solutions`: language-keyed canonical solutions (e.g., for `cpp`, `golang`, `java`, `javascript`, `python3`, `ruby`)
  - `test_case_generator`: executable code string that programmatically produces tests
  - `evaluator`: executable code string to determine pass/fail given expected vs. program output
  - `generated_tests`: serialized tests produced by the generator
  - `test_runners`: language-keyed runner templates for executing solutions

All problems are from competitive programming platforms.

## Dataset Creation

### Curation Rationale

Existing code generation benchmarks primarily focus on functional correctness with limited attention to efficiency, often restricted to Python. EffiBench-X addresses three critical limitations:

1. **Language diversity**: Extends beyond Python to include statically-typed (C++, Java, Go) and dynamically-typed languages (Python, JavaScript, Ruby)
2. **Data contamination**: Uses recent problems (post-October 2023) to avoid memorization effects
3. **Complexity**: Features algorithmically challenging problems requiring optimization techniques

### Source Data

#### Data Collection and Processing

Problems are curated from competitive programming platforms. Each problem includes:
- Human expert solutions verified for correctness and efficiency
- 100 programmatically generated test cases
- Test runners and evaluators for automated assessment
- Cross-language validation to ensure consistency

#### Who are the source data producers?

- **Problem creators**: Competitive programming platforms and contest organizers
- **Solution authors**: Human expert programmers from competitive programming communities
- **Dataset curators**: EffiBench research team

## Citation

Please cite our paper if you use this dataset:

```bibtex
@article{qing2025effibench,
  title={EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Code},
  author={Qing, Yuhao and Zhu, Boyu and Du, Mingzhe and Guo, Zhijiang and Zhuo, Terry Yue and Zhang, Qianru and Zhang, Jie M and Cui, Heming and Yiu, Siu-Ming and Huang, Dong and Ng, See-Kiong and Tuan, Luu Anh},
  journal={Advances in neural information processing systems},
  year={2025}
}
```

## More Information

- **Dataset Statistics**: 623 problems, 100 test cases per problem, 6 languages
- **Evaluation**: Sandboxed execution environment for consistent performance measurements
- For detailed information and benchmark results, please refer to the [paper](https://arxiv.org/abs/2505.13004) and [GitHub repository](https://github.com/EffiBench/EffiBench-X)

## Dataset Card Contact

For questions and feedback, please open an issue on our [GitHub repository](https://github.com/EffiBench/EffiBench-X).