Reputation: 393
is there any performance (time taken) difference between below 2 scenarios.
Upvotes: 0
Views: 99
Reputation: 137627
The costs of a procedure are due to:
proc
. Usually pretty quick; it's just got to update a few hash tables and allocate a bit of memory to store the string representation of the body.I advise not worrying too much about efficiency of procedures in themselves (as opposed to the efficiency of the code you put in them), and instead partition your code in ways that make it as clear and easy to understand as possible. Yes, there are things you can do to greatly speed them up if you've got an identified bottleneck (such as targeted bits of C code), but the actual total number of procedures is only very very rarely an issue.
Upvotes: 2