Well done!
Here are more previous tests and discussions:
Professionals in their field!
Thank you!
Also in addition - the next release by May 20 will most likely have a debugger available on historical data.
We will be showing it at the iFX Expo on May 26-28.
- iFX EXPO
- www.ifxexpo.com
Renat Fatkhullin:
- The new 64-bit MQL5 compiler is 2 to 10 times faster than the current MQL5 compiler.
The development of the new compiler has taken a long time, but the gains have been amazing. There are some issues with optimization of string operations, but we will try to speed them up as well. - The new compiler is very close to the quality and speed of the Visual Studio 2012 x64 compiler.
We haven't activated all the optimization methods yet since we are still testing them. Therefore, the results will continue to improve.
In addition, a debugger on historical data will most likely be available in the next release by the 20th of May.
We will demonstrate it at the iFX Expo on May 26-28.
The new compiler comes very close to the quality and speed of the Visual Studio 2012 x64 compiler
We haven't activated all the optimization methods yet since we are still testing them. That is why the results will continue to improve.
Good news ! Well done !
Renat Fatkhullin:
You may perform more calculations at the same time and think less about switching to DLL. This is especially important for those who do heavy maths.
Yes, I really can't think of any more tasks where external DLLs are needed.
Also in addition - the next release by May 20th will most likely have a debugger available on historical data.
This is really the most useful feature. Thank you very much indeed.
Personally I have only one question - pointers to arrays. For private arrays the problem is solved by wrapping an array into a class.
But for arrays passed into OnCalculate() function I have to copy the data into internal buffers each time, and only then pass pointers into analyzer objects and handlers. Once I've tried to pass pointers using memcpy, but somehow the speed was almost the same, and in my opinion, such "tricks" should not be applied.
Perhaps the possibility of using reference type would be more acceptable. In general, the task is to access array elements without copying them.
Yes, I can't really think of any more tasks where external DLLs are needed.
It turned out that assigning of the deviation input parameter to the deviation field of MqlTradeRequest structure instance leads to code generation error.
Hypothetical example (everything else has been removed):
sinput ulong deviation = 100; int OnInit() { MqlTradeRequest request = { 0 }; request.deviation = deviation; //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- }I get"code generation error 1 1".
If you just assign "100":
int OnInit() { MqlTradeRequest request = { 0 }; request.deviation = 100; //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- }
...then the compilation will go through without errors. Note, I have AMD Athlon II X4 645, 3.1 GHz processor. Maybe it's important (just this week MQL4 with servicedesk have been catching some bug on AMD).
My compiler doesn't complain about anything else.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
As we promised earlier, we are releasing a new MQL5 compiler optimized for the 64-bit version of MetaTrader 5.
We have kept full compatibility of the generated code both for 32-bit versions of the terminal and for older versions of the terminals.
You can already upgrade to MetaTrader 5 build 1108 with its new functionality on our MetaQuotes-Demo server. In order to enable the new optimizing compiler, add the Optimize=1 key to [Experts] in metaeditor.ini:
To test the performance of MQL4, MQL5 and C++ compilers, we have used standard compiler tests. All source files are attached together with Excel spreadsheet, so everyone can double-check it.
For now let's have a look at the test results in the following environment:
To see the detailed chart, please click on it.
What are the conclusions:
MQL5 is faster than MQL4 from tens of percents up to several times. The reason is in the execution environment and 32 bits. MetaTrader 5 has a much more efficient and constantly developing runtime.
The development of the new compiler took a long time, but the gains were amazing. There are some issues with optimization of string operations, but we will try to speed them up as well.
We haven't activated all the optimization methods yet since we are still testing them. Therefore the results will continue to improve.
What does it give to traders?
The ability to do more calculations in the same amount of time and less thinking about switching to a DLL. This is especially important for those who do the heavy maths.