|
-
Sep 1st, 2012, 07:43 AM
#1
"Cost" of calling a function
I am curious what the physical "cost" is of calling a function. What really happens to memory when that function is called.
Let's say I've got a complicated loop running in code - and I want to take the "contents" of that loop logic and put it in another C++ function.
If the "variables" and what-not (I've got large arrays and "strings" passed from "managed" code here as well) are all passed by REFERENCE - so no memory is copied for that what is other costs involved?
Is there a GOSUB-like or JSB-like statement in C++ that could help me visually organize this code without incurring the cost of calling functions??
Last edited by szlamany; Sep 1st, 2012 at 11:07 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|