Features of the mql5 language, subtleties and tricks - page 137

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
It does not seem to be about arithmetic operations, because there are none, all values are computed at the compilation stage. The reason is the presence of a loop with an unknown number of iterations (although these iterations average less than two). So your code is somehow optimized by a known number of rand() calls
https://www.mql5.com/ru/forum/308881/page3#comment_11222192
What do processor developers have to do with it? The generator is software implemented.
No, it's not. This generator is implemented in hardware. This speed cannot be achieved by software - that's obvious.
No, of course not. This generator is implemented in hardware. This speed cannot be achieved by software - it's obvious.
Actually, the hardware implement a RAND() generator, while rand() is a pseudorandom one.
MathRand
Returns a pseudo-random integer in range 0 to 32767.
Well, actually, the hardware implements a RAND() generator, while rand() is a pseudo-random one, it's written in the handbook
I'm not very familiar with the hardware one, but you'll probably be disappointed - it doesn't seem to run very fast, it's only good as seed for pseudorandom.clearly - pseudo.
Random is much slower(https://en.wikipedia.org/wiki/RdRand)
Clearly pseudo.
random runs much slower(https://en.wikipedia.org/wiki/RdRand)
Well, yes, pseudo is also shoved in. But I'm sure - rand() is implemented programmatically. Perhaps one of the "older" comrades passing by will confirm it.
Well, yes, they've put in a pseudo too. But I'm sure - rand() is implemented programmatically. Perhaps one of the "older" comrades passing by will confirm it.
But I'm sure - rand() is implemented programmatically. Perhaps one of the "older" comrades passing by will confirm it.
Yes, perhaps you're right.
This variant of rand16() function generating pre-random numbers works less than half as slow as the original function and generates random numbers from 0 to 65535.
i.e. less than 2 nanoseconds.
In addition, the class object is 16 bytes larger than the object of a similar POD structure. Thus, arrays of structures are even more economical.
Forum on trading, automated trading systems and testing trading strategies
What is different between Symbol() and _Symbol
fxsaber, 2019.07.07 14:47
If Symbol() is called inside a class/structure without ::, it might be more convenient than a predefined variable, as you can make a quick substitution by declaring a method with the same name.