This might sound like a really stupid question but what gain do I get for using pointers? I use pass by reference and have used pointers a lot but have never really thought of the actual saving achieved by doing this. I have just been taught that using pointers is faster then copying values in c++.
I understand that complexity issues are usually to get something from n^2 to nlogn for example, but if you do a pass by integers into C++ this copies the values to a new segment of memory.
You can then do the calculations and return the answer and use this, or pass by ref to affect what your doing directly.
Sorry to ramble my question is how much time does it take to copy to memory?
If a program was to use only pointers would it be 50% quicker then the same program that used unnecessary int or float passes?
Is the difference so small that no-one has ever really studied or bothered with it?