Skip to content

Commit

Permalink
perf: Compress compressible constraints
Browse files Browse the repository at this point in the history
A number of constraints are mutually exclusive and can be summed. More
importantly than being mutually exclusive, the set of those constraints
has Hamming weight 1. This implies they can safely (and soundly) be
summed.
  • Loading branch information
jan-ferdinand committed Jun 12, 2024
2 parents 6ff8500 + 2ce5ff1 commit e53402e
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 131 deletions.
14 changes: 7 additions & 7 deletions specification/src/arithmetization-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
| [CascadeTable](cascade-table.md) | 6 | 2 | 12 |
| [LookupTable](lookup-table.md) | 4 | 2 | 10 |
| [U32Table](u32-table.md) | 10 | 1 | 13 |
| DegreeLowering | 212 | 36 | 320 |
| DegreeLowering | 200 | 36 | 308 |
| Randomizers | 0 | 1 | 3 |
| **TOTAL** | **361** | **86** | **619** |
| **TOTAL** | **349** | **86** | **607** |
<!-- auto-gen info stop table_overview -->

## Constraints
Expand All @@ -34,7 +34,7 @@ Before automatic degree lowering:
| table name | #initial | #consistency | #transition | #terminal | max degree |
|:-----------------------------------------------|---------:|-------------:|------------:|----------:|-----------:|
| [ProgramTable](program-table.md) | 6 | 4 | 10 | 2 | 4 |
| [ProcessorTable](processor-table.md) | 29 | 10 | 49 | 1 | 19 |
| [ProcessorTable](processor-table.md) | 29 | 10 | 41 | 1 | 19 |
| [OpStackTable](operational-stack-table.md) | 3 | 0 | 5 | 0 | 4 |
| [RamTable](random-access-memory-table.md) | 7 | 0 | 12 | 1 | 5 |
| [JumpStackTable](jump-stack-table.md) | 6 | 0 | 6 | 0 | 4 |
Expand All @@ -43,14 +43,14 @@ Before automatic degree lowering:
| [LookupTable](lookup-table.md) | 3 | 1 | 4 | 1 | 3 |
| [U32Table](u32-table.md) | 1 | 15 | 22 | 2 | 12 |
| [Grand Cross-Table Argument](table-linking.md) | 0 | 0 | 0 | 14 | 1 |
| **TOTAL** | **79** | **76** | **158** | **23** | **19** |
| **TOTAL** | **79** | **76** | **150** | **23** | **19** |

After automatically lowering degree to 4:

| table name | #initial | #consistency | #transition | #terminal |
|:-----------------------------------------------|---------:|-------------:|------------:|----------:|
| [ProgramTable](program-table.md) | 6 | 4 | 10 | 2 |
| [ProcessorTable](processor-table.md) | 31 | 10 | 227 | 1 |
| [ProcessorTable](processor-table.md) | 31 | 10 | 207 | 1 |
| [OpStackTable](operational-stack-table.md) | 3 | 0 | 5 | 0 |
| [RamTable](random-access-memory-table.md) | 7 | 0 | 13 | 1 |
| [JumpStackTable](jump-stack-table.md) | 6 | 0 | 6 | 0 |
Expand All @@ -59,7 +59,7 @@ After automatically lowering degree to 4:
| [LookupTable](lookup-table.md) | 3 | 1 | 4 | 1 |
| [U32Table](u32-table.md) | 1 | 26 | 34 | 2 |
| [Grand Cross-Table Argument](table-linking.md) | 0 | 0 | 0 | 14 |
| **TOTAL** | **81** | **94** | **386** | **23** |
| **TOTAL** | **81** | **94** | **366** | **23** |
<!-- auto-gen info stop constraints_overview -->


Expand All @@ -71,5 +71,5 @@ In order to gauge the runtime cost for this step, the following table provides e
<!-- auto-gen info start tasm_air_evaluation_cost -->
| Processor | Op Stack | RAM |
|----------:|---------:|------:|
| 35689 | 66327 | 23592 |
| 34409 | 63859 | 22590 |
<!-- auto-gen info stop tasm_air_evaluation_cost -->
Loading

0 comments on commit e53402e

Please sign in to comment.