Let $n$ be a large positive integer. Give a nonempty collection $\mathcal S$ of subsets of $[n] := \{1,2,\ldots,n\}$, define an inner-product on $\mathbb R^n$ by
\begin{eqnarray} \langle x,y\rangle_{\mathcal S} := \sum_{S \in \mathcal S}x_S y_S, \text{ for all }x,y \in \{\pm 1\}^n. \end{eqnarray}
where $x_S := \prod_{i \in S}x_i$. Fix a vector $x \in \mathbb R^n$, and if it helps, assume that $x$ has a large number (say $n - O(\sqrt n)$) of "small" components (compared to the absolute-value largest component). Let $c(\mathcal S)$ be the worst-case time complexity for computing $\langle x,y\rangle_{\mathcal S}$, for arbitrary $y \in \{\pm 1\}^n$. By using a naive algorithm, we always have the (typically horrible!) upper-bound
$$ c(\mathcal S) = O(|\mathcal S|) = O(2^n). $$
Moreover, this upper-bound is attained when $\mathcal S$ is made of all singletons of $[n]$.
Question 1. Let $\mathcal S_{n,d}$ be the collection of all subsets of $[n]$ with $d$ or fewer elements. What is a good estimate for $c(S_{n,d})$ and which algorithm realizes it ?
Question 2. Is there any hope that $c(\mathcal S_{n,d}) = O(n)$.
Note that a naive implementation would give an algorithm where $c(\mathcal S_{n,d}) = O(|\mathcal S_{n,d}|) = O(\sum_{\ell=0}^d {n \choose \ell})$, which can be very large for when $n$ and $d$ are large.
Queston 3. Given $n \ll m \ll 2^n$, is it possible to construct $\mathcal S$ such that $c(\mathcal S) = O(n)$ (or perhaps $O(n^2)$) ?