Possible Duplicate:
Does creating separate functions instead of one big one slow processing time?
OOP Bloop boop!
Yes, OOP is great, keeps code clean and well organized. That's why I like to use it. I"m referring to to OOP very primitively specifically in using functions (defs).
Will taking out my function calls and sticking the content of the function straight into my algo increase speed of execution of the overall code? Yes, I know I can run a test myself, but I'm choosing to ask it here in the forum of my fellow coder colleagues, because I know this is a question that floats around in many heads....
def myFunc(var):
return var*3243 #perhaps more complicated function code will make a difference?
i = 0
hungry = True
while hungry:
i = i + 1
x = myFunc(i)
if i > 50:
hungry = False