Yes, more memory is required for each of the object references. If it
is a value type, then yes, you are going to have 64 bits for each object
reference for each boxed value type instance. For reference types, you are
going to have 64 bits for each of the object references as well, but thats
an issue with ^every^ object reference that you have in the app.
Now, this is an opinion, and goes a little bit beyond the scope of the
post, but it's my belief that this is something that doesn't matter in the
initial implementation of a design for a system. It's something you have to
be concerned with in the performance evaluation phase. I wouldn't even
worry about this initially (well, mostly because it's a non issue because
I'd be using the Generic versions of the data structures, but if I couldn't
use them, then I still wouldn't worry) because in a 64-bit environment, I am
going to have a virtual address space which is exponentially larger than the
address space on a 32-bit machine. So yes, while object references will
take up 64 bits, which is double the size of references on a 32 bit machine,
I'm not too concerned, because the virtual address space is going to be that
much larger.
Of course, we all know that virtual address space doesn't correspond to
physical memory, but going back to the second sentence of the first
paragraph, I feel that you are typically going to have 64-bit processors in
server environments, and in that case, you are going to have gobs of
physical memory to back up the virtual address space, which leads me to
believe it is a non-issue, at least in the initial implementation of a
design.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Frank Rizzo" <no**@none.comwrote in message
news:u4*************@TK2MSFTNGP05.phx.gbl...
Nicholas Paldino [.NET/C# MVP] wrote:
>Frank,
> Finally, the Hashtable and ArrayList are inefficient due to their
generic counterparts because of boxing issues, not because they are being
run on 64 bit systems. If the Customer type is a value type, and you
have a number of these operations taking place, you will see a
performance enhancement. You will see a little bit of a performance
enhancement with reference types, but not as much.
No, there are inefficiencies in the ArrayList on many fronts from boxing
issues to memory issues. The comparison in memory usage in the link below
shows more than 4x improvement for using List<tover ArrayList on the
64-bit system.
http://blogs.msdn.com/joshwil/archiv...13/112598.aspx