Skip to content

Commit

Permalink
reenable some optimizations and adjust costs for keccak gf2
Browse files Browse the repository at this point in the history
  • Loading branch information
siq1 committed Aug 26, 2024
1 parent af304c1 commit 3f9b7d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions expander_compiler/src/builder/final_build_opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ impl<C: Config> Builder<C> {
+ cost_of_possible_references::<C>(&[0, 1, 0], ref_count.add, ref_count.mul);
should_compress |= cost_compress < cost_no_compress;
should_compress &= e.degree() > 0;
if should_compress && false {
// Currently, this don't consider the cost of relay, so it's disabled
if should_compress {
// Currently, this don't consider the cost of relay, so it's not good in some cases
// TODO: fix this
let es = self.to_single(e);
self.in_var_exprs.push(es);
Expand Down
4 changes: 4 additions & 0 deletions expander_compiler/src/circuit/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,9 @@ impl Config for GF2Config {

const CONFIG_ID: usize = 3;

// temporary fix for Keccak_GF2
// TODO: measure actual costs
const COST_MUL: usize = 200;

const ENABLE_RANDOM_COMBINATION: bool = false;
}

0 comments on commit 3f9b7d7

Please sign in to comment.