Skip to content
Unverified Commit 1373f203 authored by Florian Hahn's avatar Florian Hahn
Browse files

[ConstraintSystem] Remove last variable, use move instead of copy. (NFC)

At the moment, a large amount of time is spent construction vectors
by pushing back all elements except the first variable. For large
inputs, such as discussed in https://reviews.llvm.org/D135915#4057050
this can result in excessive compile-time.

Instead, it is more efficient to remove the last variable. Then the
original vector can be re-used by simply popping the last element and
then moving the contents to the new system.

This improves time spent in ConstraintElimination for the linked
reproducer from ~43s to ~3s.
parent 735f117f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment