When drawing a component, you need to use some values of the current row from the DataTable dataset (say, line by line). How faster will the medium access the data of the dataRow [...] row - through the column index, its name, the DataColumn class itself? Where can I read about the analysis of such mechanisms?
- oneYou are trying to save on matches, and especially meaningless it looks at the background of the fact that all this is associated with working with databases. These tricks of yours with indexers and indexes, even if one of these options is a bit faster than the others, cannot be compared with the time to refer to the database, and the difference there will be thousands, if not millions of times. A simple analogy - you come to the store and, without hesitation, buy a huge TV there for 100 thousand rubles. And then painfully and meticulously choose the outlet and in an attempt to save money you decide to buy an outlet not for 50 rubles, but for 45 - DreamChild
- oneLook at the sources of DataRow , specifically - the indexers. A quick glance shows that the column index is the fastest. But @DreamChild is right - the difference is minor. - Raider
- Thank you, everything is clear! can be issued as an answer - kvvk
|