Algorithms, solution methods, comparison of their performance - page 2

 
Комбинатор:

Bummer.)


That's a good point.

 
Реter Konow:

In another thread, knowledgeable people have said that it is impossible to make an effective solution to write magicians to a string and get them quickly "on the fly" from the string.

However, in my opinion, if the number of future orders is unknown, then the only successful solution is to write magicians to the string.

Some kindergarten stuff at all, and even the implementation is flawed. Complete lack of understanding of what a string is, how StringFind works, etc.

 
fxsaber:

Some kindergarten stuff at all, and even the implementation is flawed. Complete misunderstanding of what a string is, how StringFind works, etc.

Well... And more concretely?
 
Реter Konow:
Well... And more specifically?

What's more specific? Can't you think of a counter-example to your implementation? Explain what arrays and structures are?

I'm afraid to even guess what will happen if you need to get not only the number of the order, but also the price, for example.

All in all, some kind of ignorance. And it is not that of a beginner, and therefore inexcusable. Shame on the resource if somebody from outside would cite this thread as an example of "look at the level of programmers in MQL!

 
Реter Konow:
Well... And to be more specific?

A string is in fact the same as a chart array, and it is also allocated additional memory when increasing.... but if you return and write the chart array instead of string in your code, you will get such nonsense

and will obviously lose out to several strings with the int array.

"Not a single extra byte in fact" - there are a ton of extra bytes and a lot of unnecessary code

 

Words and words again.

Gentlemen of the experts, make your own decision and let's compare.

Otherwise it is all an empty and useless conversation.

 

Unfortunately, I tend to think better of people and their "skills" than it turns out to be in most cases.
Reg Konow, your level of knowledge of "data structures" is 0.

That's the basics in any normal language.
What you are so proud of is complete nonsense.
It's not something anyone would need - it's a perfect example of how never to do it.
The question here is not about personalities, but the MQL community that was bred without understanding of algorithms and data structures.


1. Your code does not work.
Incorrect "_index_magic" pattern. Possible solution is "|index_magic".

2. Your algorithm has speed O(n) with as many as three passes of string valueAll_magics

3. Your performance measurement is completely incorrect:

- there is no average result in the series
- no series with search for the last index values



Instead of writing nonsense - please study something on the subject, e.g.https://habrahabr.ru/post/310794/.
And then learn how to apply CArrayList from <Generic\ArrayList.mqh>.
Good luck.

Структуры данных для самых маленьких
Структуры данных для самых маленьких
  • 2023.09.16
  • habrahabr.ru
James Kyle как-то раз взял и написал пост про структуры данных, добавив их реализацию на JavaScript. А я взял и перевёл. Дисклеймер: в посте много ascii-графики. Не стоит его читать с мобильного устройства — вас разочарует форматирование текста. Сегодня мы узнаем всё о структурах данных. «Оооооой как интересно...», да? Да уж, не самая...
 

fxsaber:

...

I'm afraid to imagine what would happen if the order number was used to get not only the Majdic but also the price, for example.

...

The same can be done. I don't see any contraindications.

 
Реter Konow:

Gentlemen of the experts, come on, make your own solution and let's compare.

Almost everyone here is willing to do so if you enter read-only mode for a month afterwards.

 
Sergey Dzyublik:

Unfortunately, I tend to think better of people and their "skills" than it turns out to be in most cases.
Reg Konow, your level of knowledge of "data structures" is 0.

That's the basics in any normal language.
What you are so proud of is complete nonsense.
It's not something anyone would need - it's a perfect example of how never to do it.
The question here is not about personalities, but the MQL community that was bred without understanding of algorithms and data structures.


1. Your code does not work.
Incorrect "_index_magic" pattern. Possible solution is "|index_magic".

2. Your algorithm has speed O(n) with as many as three passes of string valueAll_magics

3. Your performance measurement is completely incorrect:

- there is no average result in the series
- no series with search for the last index values



Instead of writing nonsense - please study something on the subject, e.g.https://habrahabr.ru/post/310794/.
And then learn how to apply CArrayList from <Generic\ArrayList.mqh>.
Good luck.

You provide your solution. Otherwise it is just empty words. Just like before.
Reason: