diff --git a/starky/src/cross_table_lookup.rs b/starky/src/cross_table_lookup.rs index 73caf28cc8..dc662fcd36 100644 --- a/starky/src/cross_table_lookup.rs +++ b/starky/src/cross_table_lookup.rs @@ -396,14 +396,14 @@ fn ctl_helper_zs_cols( challenge: GrandProductChallenge, constraint_degree: usize, ) -> Vec<(usize, Vec>)> { - let grouped_lookups = looking_tables.iter().group_by(|a| a.table); - - grouped_lookups + looking_tables + .iter() + .map(|a| (a.table, (&a.columns[..], &a.filter))) + .into_group_map() .into_iter() - .map(|(table, group)| { - let columns_filters = group - .map(|table| (&table.columns[..], &table.filter)) - .collect::], &Filter)>>(); + // We sort for determinism: + .sorted_by_key(|(table, _)| *table) + .map(|(table, columns_filters)| { ( table, partial_sums(