|
-
Sep 2nd, 2012, 07:22 PM
#4
Re: "Cost" of calling a function
Thank you - that was a great read.
I'm doing loops on 500,000+ byte chunks of memory representing the text of documents. Each character is passed through lots of conditions and also looked at against arrays of rules.
It's that moment of looking at the arrays of rules that I was thinking of removing to a separate function body - passing in whatever is needed by reference. I can see from that article how the stack builds up when that happens.
I was concerned because I was looking at it from the "outside" - where the big loop on the memory chunk is being done. But actually the amount of code running against the array of rules is huge and adding on some stack-framing requirements is most likely inconsequential to the run time.
Bottom line is I can benchmark and time this myself - and I probably should.
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
|