Observation
Based on my testing, arrays are significantly faster than vectors in this scenario—specifically, around 14 to 15 times faster.
Revelation
For parameter lists with fixed lengths, use arrays for better performance. When dealing with dynamic lengths, vectors are more efficient for faster coding. However, performance can still be optimized using pointers in either case.









maybe it's because copy by value vector, try reference?
I'm not sure whether that's the problem.
One shouldn't use vectors when the size is small and fixed.
Why there are so many downvotes?
If you are not satisfied with my content, please express your opinion.
It's because your code looks like shit.
Please learn how to write readable code from the red coders
Thx.
However, I was once a red coder QAQ.
Brilliant i see you were red. I think the downvotes are from lower rated coders which are a lot in number.
Most low rated coders want easy to understand stuff but your post is just the opposite. Complex and terse.
So maybe that's the reason for downvotes.
Yeah, I get your point and will try to make myself clear.
Thanks again!