-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcI-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Milestone
Description
This is a performance test idea. It involves registering pairs of functions -- rust and rust, rust and C++, rust and LLVM -- and comparing the ratio of their outputs in terms of number of LLVM instructions and number of machine instructions.
I think this is a nice category of test because:
- it's mostly objective (subject to clang drift) and timing-insensitive so can be turned into a performance ratchet (see
make check
should use a performance ratchet #7459) - it's easy to think of new testcases that "should be equivalent"
- it's easy to turn existing performance problems into such testcases
Some examples:
- Manually inlined things vs. types of inlining we expect LLVM to do
- Same for constant propagation
- Same for type specialization
- Comparing how we do these things vs. how C++/clang does them
- Unsafe code vs. safe code for same operations
- Match constructs vs. nested ifs
- Iteration constructs vs. manual counter loops
- Destructuring vs. field access
Metadata
Metadata
Assignees
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcI-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.