Decreased performance for using a C ++ vector instead of a C array
2 answers
No, no (assuming you compile optimally, so nesting may occur) if you mean "dynamically sized" C arrays obtained with malloc.
Fixed-size matrices in C will have the slight advantage that their address is fixed after being bound (if global) or that they live directly on the stack rather than indirectly through a pointer to what's on the heap. I believe there is still no performance difference; constant base addresses are no faster than variables; both are loaded into the CPU register.
+7
source to share