Click here to Skip to main content
15,914,289 members
Home / Discussions / C#
   

C#

 
GeneralRe: A windows service with System.Web.Mail Pin
eggie523-Jun-04 16:05
eggie523-Jun-04 16:05 
GeneralRe: A windows service with System.Web.Mail Pin
Valdair24-Jun-04 7:04
Valdair24-Jun-04 7:04 
GeneralRe: A windows service with System.Web.Mail Pin
Heath Stewart24-Jun-04 12:44
protectorHeath Stewart24-Jun-04 12:44 
GeneralSurprising performance difference Pin
the real bryon23-Jun-04 12:09
the real bryon23-Jun-04 12:09 
GeneralRe: Surprising performance difference Pin
leppie23-Jun-04 13:02
leppie23-Jun-04 13:02 
GeneralRe: Surprising performance difference Pin
Heath Stewart24-Jun-04 5:00
protectorHeath Stewart24-Jun-04 5:00 
GeneralRe: Surprising performance difference Pin
Jeremy Kimball24-Jun-04 6:07
Jeremy Kimball24-Jun-04 6:07 
GeneralRe: Surprising performance difference Pin
Heath Stewart24-Jun-04 6:50
protectorHeath Stewart24-Jun-04 6:50 
The problem here, though, isn't enumeration in general. It's the Hashtable+HashtableEnumerator that's the problem (though I wouldn't call it a problem). A Hashtable isn't a simple collection (it's not really a collection at all), so enumeration is complicated. Enumerating over an ArrayList (using the ArrayList+ArrayListEnumerator) is much, much faster, as his performance results showed.

The problem here is just a case of using the right enumeration. It wasn't just the native code behind Array.Copy that produced better results (the ArrayList was still enumerated, remember).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Surprising performance difference Pin
Jeremy Kimball25-Jun-04 1:39
Jeremy Kimball25-Jun-04 1:39 
GeneralRe: Surprising performance difference Pin
Heath Stewart25-Jun-04 3:35
protectorHeath Stewart25-Jun-04 3:35 
GeneralRe: Surprising performance difference Pin
the real bryon24-Jun-04 6:59
the real bryon24-Jun-04 6:59 
GeneralRe: Surprising performance difference Pin
Heath Stewart24-Jun-04 9:04
protectorHeath Stewart24-Jun-04 9:04 
GeneralRe: Surprising performance difference Pin
the real bryon24-Jun-04 12:09
the real bryon24-Jun-04 12:09 
GeneralRe: Surprising performance difference Pin
Heath Stewart24-Jun-04 12:34
protectorHeath Stewart24-Jun-04 12:34 
GeneralRe: Surprising performance difference Pin
leppie24-Jun-04 7:16
leppie24-Jun-04 7:16 
GeneralRe: Surprising performance difference Pin
Heath Stewart24-Jun-04 8:51
protectorHeath Stewart24-Jun-04 8:51 
GeneralDbNull to integer Pin
IamADotNetGuy23-Jun-04 10:54
IamADotNetGuy23-Jun-04 10:54 
GeneralRe: DbNull to integer Pin
Colin Angus Mackay23-Jun-04 11:00
Colin Angus Mackay23-Jun-04 11:00 
GeneralRe: DbNull to integer Pin
IamADotNetGuy23-Jun-04 11:03
IamADotNetGuy23-Jun-04 11:03 
GeneralRe: DbNull to integer Pin
Colin Angus Mackay23-Jun-04 11:10
Colin Angus Mackay23-Jun-04 11:10 
GeneralRe: DbNull to integer Pin
Valdair24-Jun-04 7:19
Valdair24-Jun-04 7:19 
GeneralRe: DbNull to integer Pin
Colin Angus Mackay23-Jun-04 11:02
Colin Angus Mackay23-Jun-04 11:02 
GeneralRe: DbNull to integer Pin
Arjan Einbu23-Jun-04 11:04
Arjan Einbu23-Jun-04 11:04 
GeneralRe: DbNull to integer Pin
IamADotNetGuy23-Jun-04 11:07
IamADotNetGuy23-Jun-04 11:07 
GeneralRe: DbNull to integer Pin
Arjan Einbu23-Jun-04 11:13
Arjan Einbu23-Jun-04 11:13 

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.