Small vectors: constants beat Big-O
Time for one inner product against p. NumPy stays near 400 ns at every size: almost all of it is start-up cost. The loop grows by about 26 ns per entry, so the loop wins up to p = 8 and loses from p = 16 on. Big-O hides exactly these constants.