$\chi^2$-test vs. sum of square differences test Let $\mathbf{x} := (x_0,\cdots,x_{N-1})$ be a $N$-tuple of elements of a finite set $\mathcal{X}$, and let $p$ be a probability measure on $\mathcal{X}$ that we assume to be nonzero everywhere.
The $T$-statistic (used in the $\chi^2$-test) is defined as $T(\mathbf{x}) := N \sum_{x \in X} \frac{\left(\frac{\vert \{k \ \vert \ x_k = x\}\vert}{N} - p_x\right)^2}{p_x}$.
Then it can be shown that if $(X_0,\cdots, X_{N-1})$ is an iid sequence, then $T(\mathbf{X})$ converges, in law, and when $N \to \infty$, to a $\chi^2(\vert \mathcal{X} \vert - 1)$ law, from which one builds the $\chi^2$-test.
Let us also consider the sum of square differences statistic (is it the official name? I learnt it from this paper but I'm sure many more statisticians have thought of this a long time ago...) defined by $SSD(\mathbf{X}) := N \sum_{x \in X} \left(\frac{\vert \{k \ \vert \ x_k = x\}\vert}{N} - p_x\right)^2$.
Then it can also be shown that if $(X_0,\cdots, X_{N-1})$ is an iid sequence, then the law of $SSD(\mathbf{X})$ converges, when $N \to \infty$, to some law that depends on $p$ (I don't know if it has a name, but it can be easily tabulated by a computer), and we can similarly devise a test for this statistic.
My questions are: is one of these tests "better" than the other? If so, in what sense, and why? Which one should be used in what context?
More generally, given two tests sharing the same purpose, what is the natural way of comparing them?
EDIT: I have just thought of something: the (limiting) law of $T$ does not depend on $p$, whereas the (limiting) law of $SSD$ does. Therefore, the $\chi^2$-test has the advantage that it is only necessary to tabulate a single law for all probabilities $p$. In the time of Pearson, this was probably a tremendous advantage. But how about now?

This is a good question. I think yes in the time of Pearson the huge of advantage of the chi-squared test was that, asymptotically, it approximates a known distribution.
One of the problems with the alternative you suggest is that it goes by many different names. Here it's referred to as goodness-of-fit test based on Euclidean distance. A revised version was later published using the term "root mean square" test. I'm sure you could find other papers that discuss this test under other names.
The first paper is a good starting place. In some cases, this test is superior to the chi-squared test, especially in a test that involves many cells with expectations near zero. Furthermore, the fact that the distribution has to be simulated isn't really a concern now given modern computing.
