Const won't necessarily make things faster but constant values will (whether or not explicitly inferred). I noticed, for example, a 2x+ speedup in one of my ray tracers by downgrading my dynamic 2d/3d/4d vector class* to always have a constant size of 3.
I would say that's unlikely. SIMD instructions don't usually get used by normal compilers without very specific loops that make sure there are no obstacles to vectorization. Also the best way to use SIMD is to loop through a large array of two and do very simple operations with them. Modern CPUs actually have three (I think) floating point slots so their total floating point throughput isn't simply a fraction of the SIMD size.
I would have to see this to believe it. Even Intel's own compiler is extremely sensitive to small changes turning off SIMD use in a loop. You can try out compilers and see their asm at godbolt.org
That has nothing to do with const. Your dynamic vectors are allocating memory over and over on the heap, which is expensive. When you use a constant size they can be allocated on the stack, which is cheap.
Good guess, but in this case the size of the vector container was always constant - 4 elements (even if only 2 or 3 of them were ever used). Presumably what made it faster was being able to unroll loops? (only a guess, never looked at the disassembly) -- so instead of 0 to x on each vector element, it would loop through 0 to 2 and could optimize around this for each function.
* (poor choice, I know)