Testing the new MQL5 compiler for x64 platforms - 2 to 10 times faster calculations! - page 20

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Optimise the logic. For example, work with arrays and loops. Try to pack the criteria values into an array. And do checks in a loop. Maybe there won't be a need in 74 thousand cases then...
Of course, in theory, you can generate each string by a long hash, and pass only these hashes, and then use it to generate everything - but I'm not sure that this will be fast and the task is not simple...
1. you will see the most 'slow' places in the code there. Although... it's another question whether it affects the compilation...
2. As you like: you can use case. You were advised to break it into small functions. Break it up and test it. Yes, of course, the code will get larger. But what to do.
And here I have rewritten the code into functions - in the appendix.
I noticed at once that the previous code took 14428 kb after compilation and the new one took 9447 kb - I'm already surprised at the difference of 5 Mbytes - where from!
Further on by the compilation speed, the former
new version
The new version is 5.46 times faster to compile.
And here is the previous version in terms of speed:
the new version.
And here we see that the first pass of agents (4 agents) is very slow - I tried it many times - the result is stable, but in the log
What's it got to do with this now, maybe@Renat Fatkhullin or@Slava can tell me why such an effect occurs?
The file is zipped. Read the zip, unzip inside. It will be faster than transferring a 500 MB EA (it's also transferred to each agent).
Doesn't it then get decompressed again with every new pass?
And would reading from the file be faster than a one-time transfer of....
Doesn't it then get unpacked again each time a new pass is made?
Yes, and would reading from a file be faster than a single pass....
Yes, it might be slower with optimization... But I would check, everything is set up for that.
Yes, it might be slower during optimisation... But I would check, everything is ready for it.
What exactly is ready - I don't understand.
What exactly is ready - I don't understand.
Working with zip archives.
Working with zip archives.
Yes, I've seen it, but haven't tried it out in practice.
It's more of a problem for me in data preparation, i.e. translating the code into a table - I'll have to process the raw data again...
Made a public version of the EA, now I'm checking - will it compile or not - the process is not fast, but now you can see that 46% of the code is compiled and already 36 GB of RAM is eaten...
Please provide me the code to investigate.
I'll check why it compiles so slowly and consumes so much memory.