
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's just a false question
How would you know the answer if you never investigated yourself?
#40 Maximum of 4? I answered OP in #1. :)
Which is faster - Floating-Point or Integer arithmetic? - Expert Advisors and Automated Trading - MQL5 programming forum - Page 11
Too much geekery kills the geek.
Too much geekery kills the geek.
Easier than installing "Wine MT4" on Linux; which requires discovering you need a MicroSoft Windows PC/MicroSoft Windows Virtualization Capable PC so you can first install it there then copy it over and cross your fingers it still works after probably first having tried a couple other more intuitive methods.
https://www.youtube.com/watch?v=fKU5_zjmEg0
Ha! Apparently MQL5 compiler is smarter than MQL4. So I've modified my test code to this for MT5:
And got these results:
So, as before, there is no clear winner. Time fluctuations, given their magnitude of <100 milliseconds for 2147483647 operations (inclusive of 2 x MathRand on top of < or <=), are likely due to pc load.
Seng Joo Thio,
You actually did a good job here.
All of us know that whichever is faster is actually negligible. But since some of us are really interested to know which is faster, so I thought of changing a bit of your code.
I didn't use random as it will give random results to compare. Also in "<=", a false result is slower than true, so random won't give a concrete finding. It maybe the fact that we are looking for once we run the code.
The results are too long to post here so feel free to run if you are interested to know. if you run the code, if possible, please do not run other apps in the background so will get a more accurate results.
Here it is...
But since some of us are really interested to know which is faster,..
Why do you find it hard to understand, you will never find who is faster, because they are exactly the same.
Now, take your test code and run both parts as '<' - and tell me which is faster.
I know they are almost the same, but please run it and tell me who is faster, the first '<' or the second '<'.
Your code should get a clear winner, even if they are almost the same, I want to know.
Why do you find it hard to understand, you will never find who is faster, because they are exactly the same.
Now, take your test code and run both parts as '<' - and tell me which is faster.
I know they are almost the same, but please run it and tell me who is faster, the first '<' or the second '<'.
Your code should get a clear winner, even if they are almost the same, I want to know.
How would you know the answer if you never investigated yourself?
How would you know the answer if you never investigated yourself?
How do you know which is faster, the first '<' or the second '<' without running a test? Please run and tell
I wouldn't post the code if I haven't tested it. It says over and over that "<" is faster than "<=". It just too long to post all the 100 cycles in here. You should test it yourself so you will know the answer. From the very beginning I never told anyone here that they are wrong. I just posted the old-school knowledge and facts that I know that I have learned throughout the years. I just posted my investigation. Please just post your own finding if you have one. Thanks.