This is slow because y is not packed. If you use:
y = Developer`ToPackedArray@RandomChoice[{-1,1}, {n,m}];
and then run z2, it will be a bit faster than your Dot approach.
If speed is a major concern, and you don't mind a bit more memory usage,
then ListCorrelate might be a good option:
In[1]:= MemoryInUse[]
MaxMemoryUsed[]
Out[1]= 5850248
Out[2]= 7176816
Your x, y modified to pack y:
In[3]:= {n, m, b} = {10000, 100, 5};(*n>>m>b*)
x = RandomReal[{-1., 1.}, n - b + 1];
y = Developer`ToPackedArray@RandomChoice[{-1, 1}, {n, m}];
In[5]:= MemoryInUse[]
MaxMemoryUsed[]
Out[5]= 10861576
Out[6]= 19951840
Using ListCorrelate:
In[7]:= z3 = Transpose@ListCorrelate[{x}, Transpose@y]; // Timing
Out[7]= {0.031,Null}
In[8]:= MemoryInUse[]
MaxMemoryUsed[]
Out[8]= 11210072
Out[9]= 23306376
An increase of a bit more than 3 MB in max memory used. The results
aren't identical, because of the vagaries of machine arithmetic, but z3
runs about 15 times faster on my machine.
Carl Woll
Wolfram Research