rust-lang / rust-lang/rustc-perf
Better benchmarks for match checking?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 732
- Forks
- 189
- Avg merge
- 10h 52m
- Merged PRs (30d)
- 43
Description
The benchmark suite includes two benchmarks that stress match checking (and I assume match codegen too): unicode_normalization and match-stress-enum. The problem with these two is that they really are not representative of matches in the wild: they both have a billion branches and a single non-nested pattern per branch, whereas real-life matches have only a couple of branches and nested patterns.
When I'm working on the exhaustiveness algorithm I would love to have a benchmark that has more representative examples, but I wouldn't know how to gather that. Like maybe every ? generates a match and that's the most common form? Or maybe derives or other macros?
I was wondering if anyone here would know how to collect those kinds of tests, or would have some time to look into that.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the existing unicode_normalization and match-stress-enum benchmarks and how they exercise match checking. Compare their branch and pattern structure with representative nested matches, then determine what benchmark additions would cover the intended cases; done means the suite includes agreed-upon representative match-checking workloads.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100