Re: Generic collections vs. arrays on structs vs. class
- From: "Nip" <admin@xxxxxxxxxxxxx>
- Date: Mon, 29 Jan 2007 18:58:47 +0100
I have forgotten to say something that might be important as well:
Memory consumption and performance depends on the language you are using. Although c# and vb are both .net languages vb needs more memory (and therefore has to read and write more) because of its compatibility to vb6.
Yours,
Lukas Cavigelli
http://www.cavigelli.net
"Nip" <admin@xxxxxxxxxxxxx> schrieb im Newsbeitrag news:0CB86D5D-02E9-437C-9AE4-8689824F87BA@xxxxxxxxxxxxxxxx
Hi
I have lately written an app to measure exactly this.
I came to the result, that an array of classes is the fastest, but structs are much less memory consuming.
About the idea of generic collections: their performance is extremely bad (i got a 4x better performance with arrays).
--
Yours,
Lukas Cavigelli
http://www.cavigelli.net
"buu" <aha@xxxxx> schrieb im Newsbeitrag news:elpl4j$s9b$1@xxxxxxxxxxxxxxxxI started working on a performance demanding app. I created structures that I put into an Array. Then I realized that arrays are byref objects, while struct is byval.
Now, I presumed, that managing these objects would be faster if I would use class instead of structure, cause I can send a reference, not the whole object as an procedure parameter. Am I right?
but.... I realized that it would be very good to use generic collections instead of array (that keeps classes). Would it be faster than structs on arrays? (or even classes put in arrays).
Also, wich kind of generic collections would be the best for it?
These objects have one primary key (because of it Dictionary is one possibility), but that object has 2-3 index keys wich are often used, but they're not unique.
Wich way you recomend?
.
- References:
- Prev by Date: Re: Generic collections vs. arrays on structs vs. class
- Next by Date: Re: Dell Inspiron 1300 Windows XP
- Previous by thread: Re: Generic collections vs. arrays on structs vs. class
- Next by thread: Re: Dell Inspiron 1300 Windows XP
- Index(es):
Relevant Pages
|
Loading