Commit 90e4fd2
authored
feat(bb/avm): use flat tuple for univariate/value containers (#16191)
Uses a flat tuple (tuplet) instead of `std::tuple` for the largest
containers (tuples of univariates). This takes compilation time for the
AVM from ~`4m43s` to ~`3m46s` on x86.
It takes tuple instantiation/recursion times from minutes to
milliseconds.
WARNING: There seems to be a change in initialization semantics, see
comments. This uncovered several sites where univariates and values were
not being set to 0.
------------
Biggest offenders in terms of template instantiations are still
- bb::RelationUtils<bb::avm2::AvmFlavor>::add_nested_tuples
-
bb::SumcheckProverRound<bb::avm2::AvmFlavor>::accumulate_relation_univariates
- bb::SumcheckProverRound<bb::avm2::AvmFlavor>::batch_over_relations
- bb::RelationUtils<bb::avm2::AvmFlavor>::scale_univariates
-
bb::SumcheckProverRound<bb::avm2::AvmFlavor>::extend_and_batch_univariates
but a lot of work would be needed to solve those. Probably some type
erasure over univariates is needed.1 parent 107e900 commit 90e4fd2
File tree
21 files changed
+1383
-109
lines changed- barretenberg/cpp/src
- barretenberg
- common
- flavor
- honk/proof_system
- protogalaxy
- relations
- sumcheck
- vm2
- constraining
- generated
21 files changed
+1383
-109
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments