0 LIKES LikeUnLike
Everywhere it says "Pointers are fast". Simply coz it stores the address and not the value.Ok.Here's a counter example.Lets say CPU has to fetch a value A of add FFFF.1) Start.2) It goes to linker3) Asks the add of A.4) Goes to FFFF add5) Fetches The value.6) DoneNow I use a pointer *ptr whose itself add is AAAA and stores add of A i.e. FFFF1) Start.2) It goes to linker3) Asks the add of *ptr.4) Goes to AAAA add5) Finds The add of A6) Goes to FFFF add7) Fetches The value.8) DoneNOTE :- In above i added two more level of execution.So then how can pointers be faster????Please explain in detail....Thanks a lot....
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 3 answers.