|
Ran
|
Jobs
1
|
Files
827
|
Run time
2min
|
Badge
README BADGES
|
push
github
Use Arc instead of Box for internal expression nodes in SymbolExpr (#14660) (#14665) This commit updates the internal construction of the SymbolExpr struct use a reference counting pointer instead of a regular pointer to a heap allocated object. The way the binary tree gets constructed internally using a normal pointer results in a lot of a copies of elements on the tree. This creates a large performance overhead for the symbol expr as we end up copying and freeing elements on the binary tree a large amount. This was the root cause of the regression reported in #14653 as the expression that gets generated by the transpiler internally ends up adding a lot of elements to global phase expression and that results in a lot of memory allocation and deallocation overhead. By using a reference counting pointer instead of creating and freeing copies of the expressions on the tree we instead only keep a single copy and just increment or decrement the reference count. Fixes #14653 (cherry picked from commit 3b2600202) Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
48 of 71 new or added lines in 3 files covered. (67.61%)
18 existing lines in 3 files now uncovered.83054 of 94392 relevant lines covered (87.99%)
516866.96 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
84.38 |
0.0% | crates/circuit/src/symbol_parser.rs |
| 22 |
73.73 |
-0.17% | crates/circuit/src/symbol_expr.rs |
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 4 |
92.23 |
-0.25% | crates/qasm2/src/lex.rs |
| 6 |
97.61 |
0.93% | crates/qasm2/src/parse.rs |
| 8 |
73.73 |
-0.17% | crates/circuit/src/symbol_expr.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 15866047036.1 | 827 |
87.99 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|