diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-27 09:00:47 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-28 09:25:01 +1100 |
| commit | afc5e1fba5e12da77c6bcb8183c277c6e61de6a3 (patch) | |
| tree | e67618934ef8ce093b6f93d0d7a6df202f6365fa /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 60bf07a26c88b6ebd2522e5ae9cd1afcfa3887f4 (diff) | |
| download | rust-afc5e1fba5e12da77c6bcb8183c277c6e61de6a3.tar.gz rust-afc5e1fba5e12da77c6bcb8183c277c6e61de6a3.zip | |
Split the `Edges` iterator.
The `Edges` iterator returns `OutlivesConstraint` elements, which are 72 bytes. This is big enough to affect performance. Return `&OutlivesConstraint` would be better. However, each `Edges` iterator is really one of two different iterators. The "from graph" case does a graph traversal and could return `&OutlivesConstraint`. But the "from static" case just does a `0..n` iteration and constructs a new `OutlivesConstraint` from that, so it can't return a reference. This commit splits `Edges into `EdgesFromGraph` and `EdgesFromStatic`, which allows them to have different return types. This is a perf win for the `wg-grammar` benchmark.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
