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

 
Alexey Sarmin:

Question: does the MT5 x64 compiler now (latest version) compile with Optimize enabled by default? (Optimize=1)


It seems so.

 

How can I reduce compiler time, even at the cost of reduced performance of the resulting code?

I need to compile a 500 megabyte file - I'm tired of waiting...

 
Aleksey Vyazmikin:

How can I reduce compiler time, even at the cost of reduced performance of the resulting code?

I need to compile a 500 megabyte file - I'm tired of waiting...

I thought you gave an example of similar code some time ago... can you do it again?

 
Alexey Kozitsyn:

I think you once gave an example of similar code... can you do it again?

Yes, here's a link to the EA.

It's been two days - the compilation is 7%...

 
Aleksey Vyazmikin:

Yes, there's a link to the EA here.

It's been two days - the compilation is 7%...

Had a look at the file... Just some case-armageddon :-)

 
Denis Kirichenko:

I took a look at the file... Just some kind of case-armageddon :-)

What to do, you need to go through many different combinations of variable sets.

 
Aleksey Vyazmikin:

What to do, there are many different combinations of sets of variables to go through.

The goal is a noble one. But why use such barbaric means? There are several unit tests in the standard MetaEditor. I haven't seen 35 Mb files there. My editor even froze :-))

 
Denis Kirichenko:

The aim is noble. But why use such barbaric means? There are several unit tests in the standard MetaEditor package. I didn't see 35 Mb files there. My editor even froze :-))

What other tools do you suggest? This is the fastest option I've come up with so far.

The file is compiled that way normally, no more than an hour to wait... but for 500 megabytes it's already difficult.

In fact, it's not even clear what the compiler is doing there, everything is very clear in the code - there's nothing to optimise, as it were...
 

To speed up compilation (optimization phase), drastically reduce the size of functions.

The more functions that are hundreds or thousands of lines long, the slower the cyclic optimization is. The code can be infinitely improved with long functions.

 
Renat Fatkhullin:

To speed up compilation (optimization phase), drastically reduce the size of functions.

The more functions that are hundreds or thousands of lines long, the slower the cyclic optimization is. You can endlessly improve code on long functions.

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 distributing tasks to agents, I'm not able to send each agent 500 megabytes, while EA code is sent to one agent (or not?) and shared between them.

Another question, my code is easily compressed by 7zip from 500 to 15 megabytes, but after compilation the file will be around 500 - why is it so - no chance to do primitive compression (even to 100 megabytes)?

Reason: