Is there any difference in processing speed if use pointers in function instead of passing by value?
tomz6
0
Newbie Poster
Recommended Answers
Jump to PostWhen you pass by value, you "create" a second instance of the variable, local only to the function receiving it...
When you pass by pointer/reference you can see it as passing a big neon arrow pointing to the original variable...
thus you can imagine, as no additional memory is allocated …
Jump to PostWell, consider this: When you pass a pointer to a function, that pointer is being passed by value. So which is faster, passing a pointer by value or passing a value by value? I don't see how a pointer can be faster. If I am figuring this right, when the …
All 6 Replies
Eagletalon
34
Junior Poster in Training
MandrewP
60
Junior Poster in Training
Eagletalon
34
Junior Poster in Training
Banfa
597
Posting Pro
Featured Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Banfa
597
Posting Pro
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.