lundi 29 décembre 2014

Nested calling vs. Calling step by step [on hold]


Vote count:

0




Is it better, from complexity eye of view, to call a function and return its value to another function



a = foo();
bar (a);


Or to make a nested call?



bar(foo());


Indeed, I am making this millions of times.


If it depends on something else, please mention it.



asked 5 mins ago

Moi

28

1 Answer



Vote count:

0




You should go for clarity - the compiler should optimize the temporary away. But if it's critical, benchmark and look at the assembly code.



answered 2 mins ago

sfjac

1,636





Nested calling vs. Calling step by step [on hold]

Aucun commentaire:

Enregistrer un commentaire