I am wondering whether or not there is a computationally efficient way to compute the first $N$ moments $$m_k=\sum_{n=1}^{N}p_nx_n^k,\;\;\;\;k=1,...,N$$ of a probability mass function with mass $p_1,...,p_N$ on $N$ points $x_1\leq x_2\leq...\leq x_N$, $x_i\in\mathbb{R}$. By computationally efficient, I mean $O(N\log N)$ complexity or similar. Computing the moments directly gives $O(N^2)$ complexity. Algorithms which return the moments to within a tolerance $\epsilon$, similar to fast multipole methods, would be of interest.
I am particularly interested in the case $-1\leq x_1\leq...\leq x_n\leq 1$. If the $|x_i|$ are uniformly bounded away from 1, then only the first $O(\log N)$ of the $m_k$ are significantly different from 0, since $|x_i^k|\leq \epsilon/N$ for $k\geq C\log N$. Then the interesting moments can be computed in $O(N\log N)$ time. I am wondering what can be said in the general case where $|x_i|$ may be close to 1.