call from pointers vs objects | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

call from pointers vs objects

why is more efficient and faster call member functions with pointers than doit directly with their objects??

6th Jul 2019, 1:57 AM
BinaryEden
BinaryEden - avatar
1 Answer
+ 2
Ok It’s more efficient and faster to call member functions with pointers than their objects because: When you call an object the computer search through every chunk of the memory to find the object so it is easier for the computer to give it the address of the value than giving the value and search for the address. I think
10th Jul 2019, 10:43 AM
Fouad Ahmed
Fouad Ahmed - avatar