Click here to Skip to main content
15,896,154 members
Home / Discussions / C#
   

C#

 
QuestionControl Size Pin
#realJSOP12-Dec-08 11:17
professional#realJSOP12-Dec-08 11:17 
AnswerRe: Control Size Pin
Christian Graus12-Dec-08 11:43
protectorChristian Graus12-Dec-08 11:43 
GeneralRe: Control Size Pin
#realJSOP12-Dec-08 15:00
professional#realJSOP12-Dec-08 15:00 
GeneralRe: Control Size Pin
Christian Graus12-Dec-08 19:28
protectorChristian Graus12-Dec-08 19:28 
GeneralRe: Control Size Pin
#realJSOP13-Dec-08 0:25
professional#realJSOP13-Dec-08 0:25 
GeneralRe: Control Size Pin
#realJSOP13-Dec-08 5:17
professional#realJSOP13-Dec-08 5:17 
GeneralRe: Control Size Pin
#realJSOP14-Dec-08 1:51
professional#realJSOP14-Dec-08 1:51 
QuestionDictionary Performance Question Pin
Jammer12-Dec-08 10:11
Jammer12-Dec-08 10:11 
Hi All,

I'm just rewriting a core function in an application I'm working on and was wondering what peoples thoughts are on the performance side of things.

I have a set of data that lives in a DataTable, the data in this DataTable is used to separate the data into lookups based on a key/value pairs. This suggests they should be Dictionary<string,string> (which is how I have in fact coded it) there are two lookups varying in size from 22 items to 220 items and two Dictionary<string,int> lookups that keep track of matches.

All 4 Dictionary lookups are declared static in the class and if any are empty or null at object initialisation they are all initialised in a single loop over the DataTable (which is itself set up as a thread-safe singleton).

The two main lookups are going to be looped over looking for matches thousands of times in the life of the app so getting them as performance tweaked as possible is really important.

Does this sounds like a sensible approach or are there alternatives that might perform better?

All the data in the look ups are upper cased strings, I've heard that C# actually performs string comparisons quicker if both are upper cased, does this actually stand up as correct?

Would appreciate any thoughts.

Cheers,


AnswerRe: Dictionary Performance Question Pin
PIEBALDconsult12-Dec-08 10:51
mvePIEBALDconsult12-Dec-08 10:51 
GeneralRe: Dictionary Performance Question Pin
Jammer12-Dec-08 11:23
Jammer12-Dec-08 11:23 
AnswerRe: Dictionary Performance Question Pin
Guffa12-Dec-08 11:04
Guffa12-Dec-08 11:04 
GeneralRe: Dictionary Performance Question Pin
Jammer12-Dec-08 11:23
Jammer12-Dec-08 11:23 
Questionformat disk [modified] Pin
LordZoster12-Dec-08 5:54
LordZoster12-Dec-08 5:54 
AnswerRe: format disk Pin
Giorgi Dalakishvili12-Dec-08 8:40
mentorGiorgi Dalakishvili12-Dec-08 8:40 
GeneralRe: format disk Pin
EliottA12-Dec-08 8:49
EliottA12-Dec-08 8:49 
GeneralRe: format disk Pin
LordZoster12-Dec-08 9:09
LordZoster12-Dec-08 9:09 
GeneralRe: format disk Pin
EliottA12-Dec-08 9:33
EliottA12-Dec-08 9:33 
GeneralRe: format disk Pin
Uwe Keim12-Dec-08 9:49
sitebuilderUwe Keim12-Dec-08 9:49 
GeneralRe: format disk Pin
LordZoster12-Dec-08 10:05
LordZoster12-Dec-08 10:05 
AnswerRe: format disk Pin
LordZoster14-Dec-08 23:12
LordZoster14-Dec-08 23:12 
QuestionHow to cast an object using its handle? Pin
MAP Tiger12-Dec-08 5:36
MAP Tiger12-Dec-08 5:36 
AnswerRe: How to cast an object using its handle? Pin
Mark Salsbery12-Dec-08 7:13
Mark Salsbery12-Dec-08 7:13 
GeneralRe: How to cast an object using its handle? Pin
MAP Tiger12-Dec-08 7:23
MAP Tiger12-Dec-08 7:23 
GeneralRe: How to cast an object using its handle? Pin
Mark Salsbery12-Dec-08 7:28
Mark Salsbery12-Dec-08 7:28 
GeneralRe: How to cast an object using its handle? Pin
MAP Tiger12-Dec-08 8:43
MAP Tiger12-Dec-08 8:43 

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.