Or, if you’re only interested in the degree of correlation right now without shifting either signal, sum(x * y)
will be high if x and y are highly correlated, and lower if they are not correlated. (The cross-correlation function checks every possible amount of shift.)
hjh