Some time ago, we did some research about speeding up binary
serialization for remoting and we found out that the .NET 1.x codebase was
faster than the .NET 2.0 codebase. After profiling the code, it turned out
that the generic dictionary objects were slowing things down. Replacing them
with hashtables made it equal again (or .net 2.0 became slightly faster).
Looking deeper into it, the GetObjectData routines differ. When I made a
Dictionary class which had a similar GetObjectData routine as Hashtable,
namely serializing the keys and values as object arrays, it was solved.

Okay, good to know. If I ever need it, I'll time it myself :)

       The Order of the items isn't important for hashtables/dictionaries, as
the order isn't defined: you can't pull the data out in a given order.

Well, you can enumerate over the items, keys, and values (and do
CopyTo), and I guess one _could_ expect a deserialized Dictionary to
enumerate in the same order as the original one unless explicitly told
it isn't so.

Fabian

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to