Original Post
someFunction { ......... call1(); somecalc(); call2(); ......... } I draw the 3 line to a function because it often call in many app. dothing() { call1(); somecalc(); call2(); } but somecalc() is used somewhere and it cost time much. so somecalc() is called more than once.it suffer performance lost. how to refactor these code with good code sturctrue and performance. i do this way: somcalc() first call. and pass the value to dothing(). but i seem bad