In my programm I have a function that takes multiple vectors as arguments. I used to pass them as normal vectors so like the definition of the function starts like this:
void do(std::vector<int> a, std::vector<int> b, std::vector<int> c){
and the call looks like this:
do(d, e, f);
but I want my code to be as fast as possible so I wondered whether passing not the vectors but pointers to the vectors would be faster. So the definition of the funtion would look something like this:
void do(std::vector<int> *a, std::vector<int> *b, std::vector<int> *c){
and the call like this:
do(&d, &e, &f);
Does this change make a difference in performance? If yes: positive or negative and is it a big difference if my vectors contain just 3 elements?