language agnostic - When should I consider the performance impact of a function call? -
in recent conversation fellow programmer, asserted "if you're writing same code more once, it's idea refactor functionality such can called once each of places." my fellow programmer buddy instead insisted performance impact of making these function calls not acceptable. now, i'm not looking validation of right. i'm curious know if there situations or patterns should consider performance impact of function call before refactoring. "my fellow programmer buddy instead insisted performance impact of making these function calls not acceptable." ...to proper answer " prove it. " the old saw premature optimization applies here. isn't familiar needs educated before more harm. imho, if don't have attitude you'd rather spend couple hours writing routine can used both 10 seconds cutting , pasting code, don't deserve call coder.