Hi,
I just wrote a little script for a speed test:
And this is the result:
What's your conclusion ?
That seems perfectly normal to me as MathPow is a generic solution, not a "power 2" function.
EDIT: Here is my results.
2015.01.17 10:57:34.256 66392 EURUSD,M15: Loops: 100000000 MathPow( (x*y),2 ) => 12.824 sec Pow2( (x*y) ) => 0.343 sec
Hi,
I just wrote a little script for a speed test:
And this is the result:
My result
EURUSD,M15: Loops: 100000000 MathPow( (x*y),2 ) => 11.294 sec Pow2( (x*y) ) => 0.203 sec
Likewise - and then..?
What's your conclusion ?
That seems perfectly normal to me as MathPow is a generic solution, not a "power 2" function.
EDIT: Here is my results.
2015.01.17 10:57:34.256 66392 EURUSD,M15: Loops: 100000000 MathPow( (x*y),2 ) => 12.824 sec Pow2( (x*y) ) => 0.343 sec
Well on one hand of course I am not surprised on the other hand one can think that build in functions are coded in a way that they in the end are faster or equivalent to 'user functions' and last but not least I would not have expected that MathPow(..) is 42 times slower than Pow2()!
Can you code it in C/C++ using pow() function and compare the results ? I am not at my main computer and don't have a C compiler installed.
I doubt it's an mql4 issue, as they probably use the underlying C function.
Can you code it in C/C++ using pow() function and compare the results ? I am not at my main computer and don't have a C compiler installed.
I doubt it's an mql4 issue, as they probably use the underlying C function.
Sorry no, I have neither a C nor C++ compile installed.
But it is interesting that on my Laptop (Win7 64, Intel Core2 Extreme Q9300 @ 2.53 GHz) compared to your results the MathPow-results are somewhat similar (15.850 sec) to yours (~12 sec) while your Pow2-execution is about 3 times faster than mine!
Why is MatPow() not equivalently faster on your pc (I guess really fast pc) than on my 8 years old laptop?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I just wrote a little script for a speed test:
And this is the result:
2015.01.17 10:05:19.913 SpeedTest EURUSD,M1: Loops: 100000000 MathPow( (x*y),2 ) => 15.850 sec Pow2( (x*y) ) => 1.139 sec