regex_engine
expertruntimeRust
results
Measured by wall-clock runtime in seconds — lower is better.
1.5s0.37s
sota
Usage
Run the reference answer to verify your environment is set up correctly
$ harbor run -p tasks/regex_engine
Test model
$ harbor run -p tasks/regex_engine \ -a claude-code -m claude-opus-4-6
Description
Build a regex engine in Rust that compiles a fixed set of patterns and matches them against 100,000 haystacks (HTTP paths, log messages, emails, etc.) as fast as possible. Both compilation and search time are measured. Supported syntax includes alternation, quantifiers, character classes, anchors, and grouping.
Files
path
permission
/app/src/solve.rs✎ Edit/app/src/main.rsRead-only/app/Cargo.tomlRead-onlyRules
- 01Edit /app/src/solve.rs only.
- 02No external crates. Pure Rust only.
- 03Single-threaded only. Output must remain exactly correct.
Tags
rustregexautomatanfadfacompiler
Model Results
Click a row to view its trajectory in Live Lab
model
reward
score
1.000
0.410
Kimi-K2.6
0.370
0.190
0.120
Grok-4-20
0.080
0.080
Hunyuan-3-Preview
0.070
MiMo-V2.5-Pro
0.020
DeepSeek-V4-Pro
0.000
Qwen-3.6-Plus
0.000