Skip to content

Commit

Permalink
fix: fixes #155 slow compiling with plonk frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
gbotrel committed Nov 3, 2021
1 parent ca6f89a commit 0da1f52
Show file tree
Hide file tree
Showing 4 changed files with 231 additions and 175 deletions.
15 changes: 8 additions & 7 deletions frontend/cs_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,14 @@ func (cs *constraintSystem) Select(i0, i1, i2 interface{}) Variable {
// ensures that b is boolean
cs.AssertIsBoolean(b)

if b.isConstant() {
c := b.constantValue(cs)
if c.Uint64() == 0 {
return vars[2]
}
return vars[1]
}
// this doesn't work.
// if b.isConstant() {
// c := b.constantValue(cs)
// if c.Uint64() == 0 {
// return vars[2]
// }
// return vars[1]
// }

if vars[1].isConstant() && vars[2].isConstant() {
n1 := vars[1].constantValue(cs)
Expand Down
Loading

0 comments on commit 0da1f52

Please sign in to comment.