Skip to content

Better benchmarks for match checking? #792

Open
@Nadrieril

Description

@Nadrieril

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-benchmarkIssues related to benchmarks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions