Skip to main content
gamedev.net
🔒 Locked

refactor and performance

Started by derek7 Sep 26, 2006 at 5:28 AM 1 replies 650+ views
Original Post
derek7
derek7
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
ApochPiQ
ApochPiQ
I'm having trouble understanding your situation with so little context; any chance you could post some or all of the actual code involved, or at least describe what it is you're doing and what needs to be refactored?

Also, you have done profiling to determine that you really do need to make this change, right?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.