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

 
Instead of a switch, make an array of functions callable by direct index. it's just as fast and the optimiser won't die
 
:)
 
Andrei Trukhanovich:
Instead of a switch, make an array of functions called by direct index. it's just as fast and the optimizer won't die.

Please express your idea in code.

 
Yeah... problem.
 
Ilyas:

Please provide me the code to investigate.

Maybe you can also find out why this code

Works much faster (about 30%) than this one, but it is 10% more (10 megabytes)?

 
Алексей Тарабанов:
Yeah... Problem.

I don't get it, are you trolling or are you really outraged?

 
Aleksey Vyazmikin:

Please express your idea in code.

Alexei, you've already been told... But, you want a code. Most likely it will be. I just think so.

 
Алексей Тарабанов:

Alexei, you've already been advised... But, you want a code. Most likely it will be. It just seems that way to me.

I don't understand how to present this code as an array of functions without substantial rework.

 

Ilyas, the test code compiled without error. Started the non-test one again - maybe it will compile the second time - if not, can you drop it in the mail?

 
The EA's run took 32 minutes instead of the previous 27 seconds - in fact, the code only added more "Case" enumerations, which, from my understanding, could not have slowed down the work of .... so much
Reason: