First post here, hi everyone!
I've always been worried that really long variable and function names would affect my EA's speed so I got into the habbit of renaming inputs like this:
But I don't know if that changes anything after compiling the code...
Now I realize that it's causing issues when I change input parameters as the input change isn't being seen by the short-name var on re-init. So I have to create an extra step like this:
Now it works as intended: if I change the input settings, the new values get passed to the short-name vars correctly even if the EA is live.
But is all of this supposed to have an impact of the EA's efficiency or am I just wasting time with useless code? Because if none of this matters after compiling the code then there's no reason to be doing any of this going forward.
If any of you know what happens to the variable and function names once you compile the MQL5 code I would like to know if the length of the names in the source code matters for the compiled version. If the names are shorter, does it use less CPU, does it get processed faster?
Thanks
MQL is a compiled language. not an interpreted language. The length of a variable/function name is irrelevant at execution time.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
First post here, hi everyone!
I've always been worried that really long variable and function names would affect my EA's speed so I got into the habbit of renaming inputs like this:
But I don't know if that changes anything after compiling the code...
Now I realize that it's causing issues when I change input parameters as the input change isn't being seen by the short-name var on re-init. So I have to create an extra step like this:
Now it works as intended: if I change the input settings, the new values get passed to the short-name vars correctly even if the EA is live.
But is all of this supposed to have an impact of the EA's efficiency or am I just wasting time with useless code? Because if none of this matters after compiling the code then there's no reason to be doing any of this going forward.
If any of you know what happens to the variable and function names once you compile the MQL5 code I would like to know if the length of the names in the source code matters for the compiled version. If the names are shorter, does it use less CPU, does it get processed faster?
Thanks