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

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
Hasthe profiler been suggested yet?
Option no. 2. Take each line of type:
into a separate function. Try to believe Renate:)
I.e. the result should be like this in the end:
etc.Yes, there's a link to the EA here.
It's been two days - the compilation is 7%...
On this machine.
Hasthe profiler been offered yet?
No it hasn't - what exactly am I supposed to see in it? I don't really know how to use it.
Option 2. To put each line of the type:
into a separate function. Try to believe Renate:)
I.e. the result should be so in the end:
etc.It is the "case :" variant and not the "if" variant that gives a significant speed gain there. If you even make it like
The code will get even larger. But you may compare the compilation time and performance, of course...
On this car.
Yeah that code isn't big, I haven't posted a 500 megabyte code - if you need it I can...
What other means do you suggest? This is the fastest option I've come up with so far...
Optimize 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 then there won't be a need in 74 thousand cases...
1. No they didn't - what exactly am I supposed to see in it? I don't really know how to use it.
2. it is the "case :" variant and not the "if" variant that gives a significant speed boost. If you even make it like
The code will get even faster... But you can certainly compare the compilation time and performance...
1. You will see the slowest parts of the code there. Although... Another question is whether it affects the compilation...
2. As you like: you can use case. You were advised to break it into smaller functions. Break it up and test it. Yes, of course, the code will get larger. But what to do.
I would transfer this enumeration, let's say, to external CSV file, but then another problem arises - waste of time to read the file, and besides, when handing out tasks to agents I am not able to send each agent 500 megabytes, while EA code is sent to one agent (or not?) and divided between them.
And another question, my code is easily compressed by 7zip from 500 to 15 megabytes, but after compression, the file will be around 500 - why is it so - no way to do primitive compression (at least up to 100 megabytes)?
Compress the file by zip. Read zip, decompress inside. It will be faster than transferring 500 Mb of EA (it is also transferred to each agent).
@Renat Fatkhullin, could you please clarify, can the profiler help to reveal compilation bottlenecks? Or use it only to check code speed in real time?
The profiler has nothing to do with compilation.