binius_math/evaluation_order.rs
1// Copyright 2025 Irreducible Inc.
2
3/// Sumcheck evaluation order.
4///
5/// While one can reasonably perform sumcheck over any permutation of the variables,
6/// ultimately only two evaluation orders make sense - low-to-high and high-to-low.
7///
8/// Each have pros and cons under little endian representation of multilinears:
9/// 1) Low-to-high - good locality of access (especially for univariate skip), but needs
10/// deinterleaving which prevents byteslicing; computes partial low foldings.
11/// 2) High-to-low - worse locality of access in univariate skip, but byteslicing friendly,
12/// has inplace multithreaded folding; computes partial high foldings.
13#[derive(Clone, Copy, Debug, PartialEq, Eq)]
14pub enum EvaluationOrder {
15 /// Substituting lower indexed variables first.
16 LowToHigh,
17 /// Substituting higher indexed variables first.
18 HighToLow,
19}