
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
There was already a discussion about [] operator, that it is somehow too slow for C++ language like this. I didn't think it was so slow that ArrayCopy can tear it apart.
That's a separate question about increments inside operators.
Why did you fix yourself and throw me out? Not good.
I didn't throw anybody out. What I downloaded, I returned )))
Didn't throw anyone out. What you downloaded you returned ))))
well so you downloaded the 11th, mine is the 12th(below) and you fixed the 11th and returned it as the 13th.
There was already a discussion about [] operator, that it is somehow too slow for C++ language like this. I didn't think it was so slow that ArrayCopy can tear it apart.
That's a separate question about increments inside operators.
There's not even any unnecessary operations here. If looping is in progress. There is no need to check if the current item is out of bounds when it is being copied. It will be inside the bounds. And there is no sense in adding something, or pulling one more variable. If by default, there is an i.
Anyway, there is all sorts of trivial stuff. Just for information
well so you downloaded the 11th, mine is the 12th(below) and you fixed the 11th and returned it as the 13th.
Didn't pay attention. Replaced the file.
also sketched in this ruthless competition :-)
Again, not checked :-) should work...
Have recommended tests containing errors (Semko and Pavlov) .
Thanks, fixed it.
also sketched in this merciless contest :-)
Again, not checked :-) should work...
included, but there is something wrong with the first variant
I come back to my misunderstood difference in execution time of almost 100% identical in logic and number of checks and sums of two loops:
So, again, why such a variant from Kuznetsov's code:
works more than twice as fast as the one that does exactly the same thing:
What are the wonders of the compiler?
Is it really possible for such a design:
while(arr[i]!=x && i<j) i++;
the compiler finds some special assembler's search command for the processor? But there is an additional check i<j inside, isn't there?
Because the same thing through for is executed much slower:
I attach the code of the demonstration script
This is how it often happens. You are busy with some unnecessary rubbish and find out something rather interesting.
Developers, could you have a look at the executable code and see what makes this difference?
You need to understand the logic of the compiler in order to create more optimal algorithms in the future.
Interesting observation. and for the sake of interest, ran the code
I come back to my misunderstood difference in execution time of almost 100% identical in logic and number of checks and sums of two loops:
So, again, why such a variant from Kuznetsov's code:
works more than twice as fast as one that does exactly the same thing:
What are the wonders of the compiler?
Is it really possible for a construct like this:
the compiler finds some special assembler's search command for the processor? But there is an additional check i<j inside, isn't there?
Because the same thing through for is executed much slower:
I attach the code of the demonstrating script
This is how it often happens. You are busy with some unnecessary rubbish and find out something rather interesting.
Developers, could you have a look at the executable code and see what makes this difference?
You need to understand the logic of the compiler in order to create more optimal algorithms in future.
I think it's a good match for the flags:
http://osinavi.ru/asm/4.php
And for for unnecessary operators/comparisons...