What is your language ? You'll find a class vs struct comparison in your
documentation. I'm not sure about why you compare them with an array which
has a different purpose.
If you meant you could also store member values as cells in an array, I
would strongly recommend stop bothering with micro optimization. This is
typically the kind of thing you'll never noticed because even if one is
twice as fast as the other you'll gain few microseconds anyway (i.e you
could even go from 0,005 s to 0,050 s without noticing while going from 5 s
to 50 s is much more noticable though in both cases you are 10 times faster)
and you'll losee a lot in term of clarity.
Use whatever is at your disposal and makes sense from a logical point of
view. Unless you have quite obvious concerns with a performance problem
rather than being too paranoid about them....
--
Patrice
"rodchar" <rodchar@discussions.microsoft.coma écrit dans le message de
groupe de discussion :
2A1691DF-A026-43F7-B22C-1025622EC2B8@microsoft.com...
Quote:
yes, that is it exactly. I just wanted to know the most light-weight and
efficient way to store an array of different types variables. I thought
using
a struct would be more light-weight than a class or an array? or does it
matter?
>