Click here to Skip to main content
15,884,298 members
Home / Discussions / C#
   

C#

 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 21:28
Som Shekhar16-Dec-09 21:28 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen16-Dec-09 21:34
professionalEddy Vluggen16-Dec-09 21:34 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 21:39
Som Shekhar16-Dec-09 21:39 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen16-Dec-09 21:53
professionalEddy Vluggen16-Dec-09 21:53 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 21:56
Som Shekhar16-Dec-09 21:56 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen17-Dec-09 1:53
professionalEddy Vluggen17-Dec-09 1:53 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar17-Dec-09 2:40
Som Shekhar17-Dec-09 2:40 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen17-Dec-09 9:34
professionalEddy Vluggen17-Dec-09 9:34 
Som Shekhar wrote:
I really appreciate your efforts.


Nice to see someone who's biting into a subject, instead of just asking for code Smile | :)


Som Shekhar wrote:
But the question is to know if I am missing something fundamentally? If there is an implementation already present? Like we have Hashtables, List, Dictionaries for various purposes. Is there any other tool that I missed which can handle such a case?


Not that I know. Yes, we got generic lists that can take all kinds of data, and we got observable lists that give you a notification if anything changes. But no list that's specialized in doing an incremental save.

I think that most of us would cache the result, storing redundant values. It's a waste of memory, I know, but we often make these kind of trades. If you got some spare CPU-time, then it might make sense to add this optimization. You'll lose a bit of speed reconstructing the data at a particular index, but return you'd have some extra memory.

The guys who work with Windows Mobile might have more experience with this, as they have less resources and actually need to think about using them effectively. On my desktop, I don't mind wasting a megabyte or so, if it means that I can spend my time on more critical issues.


Som Shekhar wrote:
Or, may be there could be a need to develop such a list which could only record changes, do all the calculations internally, fast enough to match those of dictionary/indexed methods.


Again, recalculating the data will (logically seen) cost more processor-time than just reading it. Then again, the time that it takes might be neglectable, and it may also be true that you win back a fair amount of memory. That would depend on the amount of data, and the amount of 'holes' that one has to move through to get the 'last known values' for the columns on that particular index.

At the start of this thread, I would have advised against that on the assumption that there's not much to gain. I'm not that sure anymore. The only way to get a definite answer is by building a prototype and measuring the results. Therein lies another consideration; would it be worth to spend the time on building such a prototype?

I are Troll Suspicious | :suss:

GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar17-Dec-09 10:12
Som Shekhar17-Dec-09 10:12 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen17-Dec-09 13:13
professionalEddy Vluggen17-Dec-09 13:13 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar18-Dec-09 18:59
Som Shekhar18-Dec-09 18:59 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen19-Dec-09 0:48
professionalEddy Vluggen19-Dec-09 0:48 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar19-Dec-09 2:28
Som Shekhar19-Dec-09 2:28 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen19-Dec-09 9:41
professionalEddy Vluggen19-Dec-09 9:41 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar19-Dec-09 20:16
Som Shekhar19-Dec-09 20:16 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen20-Dec-09 5:54
professionalEddy Vluggen20-Dec-09 5:54 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar20-Dec-09 18:22
Som Shekhar20-Dec-09 18:22 
AnswerRe: Continued Values Collection/List/Dictionary [modified] Pin
Gideon Engelberth16-Dec-09 15:05
Gideon Engelberth16-Dec-09 15:05 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 19:15
Som Shekhar16-Dec-09 19:15 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Gideon Engelberth17-Dec-09 3:31
Gideon Engelberth17-Dec-09 3:31 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar17-Dec-09 3:42
Som Shekhar17-Dec-09 3:42 
AnswerRe: Continued Values Collection/List/Dictionary [modified] Pin
BillWoodruff16-Dec-09 16:55
professionalBillWoodruff16-Dec-09 16:55 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 19:17
Som Shekhar16-Dec-09 19:17 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 19:19
Som Shekhar16-Dec-09 19:19 
GeneralRe: Continued Values Collection/List/Dictionary Pin
BillWoodruff16-Dec-09 19:41
professionalBillWoodruff16-Dec-09 19:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.