Closed lognorman20 closed 3 months ago
Another aspect I noticed is that the # of constraints for equal and not equal are roughly the same. Definitely some improvement can be done for both
thanks for the experiment here! I can close this one as we merged the other!
This PR aims to optimize #119. Implements
equal_cells
inis_zero
in an effort to reduce constraints. The result of doing this are presented in this table:Although the number of constraints went in the wrong direction, I have an idea for improvement. First is implementing more bitwise operations to avoid adding constraints. Functions such as
equal
,is_zero_cell
, and even arithmetic operations likesub
andmul
can be implemented using bitwise operations that avoid creating unnecessary internal variables. As the language continues to expand, more operations will come such as bitshifts and xor which will enhance the possibilities to optimize. Moving the workload to bitwise operators to reduce constraints might just be moving the problem to another area though and I'm curious to hear what other ideas there are.