PureBytes Links
Trading Reference Links
|
Nope, no difference all things being equal, meaning the lengthy code
gets calculated the same number of times either way. Making it a
function could even slow it down e.g. if it doesn't need to run on every
bar but you save it as a series function that calculates on every bar
whether you call it or not.
Chris Evans wrote:
>
> I have a system that is based on a long program (800 lines of code) and I
> want to study some optimization of its few inputs. If I convert its primary
> variable to a function and then use that function in the strategy rather
> than just have it computed inside the strategy –will that make the code
> faster when I run optimizations?
> CE
--
Dennis
|