Generic Class Library - bugs, description, questions, usage and suggestions - page 15

 
Vasiliy Sokolov:

The proposed dictionary solution has several advantages, the most important of which is not entirely obvious at first sight. When we write code like this:

We're hardwiring the error codes into the EA code itself. When we fill the dictionary, we do it dynamically, i.e. at the moment of program execution. The dynamic approach gives more flexibility. For example, the error codes may be contained in a special file like ErrorsCode.txt:

At the moment of launching the program may read this file and fill the dictionary with the required codes and then return the user the required variant of the string. There can be several such files: one file for each language. In this way, a localization can be done where the error codes in the user's language are displayed, depending on the user's language. Furthermore, the user himself can translate these error codes into his own language once and the program itself "learns" to output the desired message in his language. This is how most programs are localized, when the translation of a menu is contained in a text file, and the program loads it, depending on the settings. That is, without any recompilation of the program and without changing its algorithm, we can significantly affect the representation of its results.

Well, you understand, that such "localizations" are done perfectly well without HashMap. I.e. again we can only call as advantage only search speed here. But in this task in practice it is not needed at all.

I.e. there must be a task, which will show a practical advantage in the form of reduced optimization time. Other examples will always be very private and just as questionable. As for the Optimizer, you can't argue with that.

 
fxsaber:

Well, you understand that such "localizations" are done perfectly well without HashMap. I.e. again, the only plus is the search speed here. But in this task in practice it is not needed at all.

I.e. there must be a task, which will show a practical advantage in the form of reduced optimization time. Other examples will always be very private and just as questionable. But the Optimizer - there's no arguments.

The point in this case is not the speed. But in the example - so to speak "to understand" the essence. And where to apply this "essence" is another matter.

 
Artyom Trishkin:

The point in this case is not speed. But in the example - so to speak "to understand" the essence. And where to apply this "essence" is another thing.

I have a slightly different perception.

 

Forum on trading, automated trading systems and trading strategies testing

Algorithms, Decision Methods, Comparison of Their Performance

Sergey Dzyublik, 2017.12.11 10:41

In this particular case: index => value.
It's faster to useCArrayList thanCHashMap.

CArrayList takes more than twice less space, also it has less rearrangements when adding new elements (CArrayList has a growth factor of 2, whileCHashMap in current implementation is about 1.2).
And there is less gestures when reading the result inCArrayList.

I don't understand it yet, despite the explanations. My own illiteracy is an obstacle. I haven't dared to get into the guts of libraries - the implementation/abstraction style repulses me. But I guess I will have to.

 
fxsaber:

I have a slightly different perception.

I agree. There are a lot of cool things in the world, but not all of them are necessary for trading. That's how it is with this library. What does it give to a trader?

(I repeat the question, because either it was not noticed, or no one knows why a trader needs it)

 
fxsaber:

I have not yet understood this, despite the explanations. My own illiteracy is an obstacle. I haven't dared to get into the guts of libraries yet - the style of implementation/abstraction repulses me. But I will have to, I guess.


If you want, I can briefly describe the architecture ofCHashMap implementation - it's not trivial.

 
Alexey Oreshkin:

I second that. There are a lot of cool things in the world, but not all of them are necessary for trading. So it is with this library. What does it give to a trader?

(I repeat the question because either it was not noticed or nobody knows why a trader needs it)


Containers give people who know about data structures a convenient interface for fast processing of a certain data set.
In many programming languages containers are integral parts and directly integrated into the language itself.
Just because you don't know how to use something doesn't mean it's not convenient or necessary.

 
Sergey Dzyublik:

If interested, I can briefly describe the architecture ofthe CHashMap implementation - it is not trivial.

Interesting. And this question. I didn't like the current implementation and I tweaked it. Of course, it's a bit messed up. How do I get original biblical version?

 
Sergey Dzyublik:


Containers give people who understand data structures a convenient interface to quickly process a particular data set.
In many programming languages, containers are an integral part and directly integrated into the language itself.
Just because you don't know how to use something doesn't mean it's not convenient or useful.

I'm not saying it's not necessary. I'm interested how it might help in trading. Exactly in trading. And not in programming spherical horses in a vacuum. If they were writing software for weather stations in µl that predicts the weather, there is no question that it is simply necessary and how and where it can be used.
Anyone specifically answer with respect to trade?
 
Alexey Oreshkin:
Is there anyone who can give me a concrete answer on trading?

Is the speed of the tester important for trading? If yes, then HashMap also affects the trading, because it increases the speed of development and execution of TS.

Reason: