Click here to Skip to main content
15,881,715 members
Home / Discussions / C#
   

C#

 
GeneralRe: Dynamic Arrays Pin
harold aptroot30-Aug-10 4:07
harold aptroot30-Aug-10 4:07 
GeneralRe: Dynamic Arrays Pin
Bassam Abdul-Baki30-Aug-10 4:24
professionalBassam Abdul-Baki30-Aug-10 4:24 
GeneralRe: Dynamic Arrays Pin
harold aptroot30-Aug-10 4:30
harold aptroot30-Aug-10 4:30 
GeneralRe: Dynamic Arrays Pin
Bassam Abdul-Baki30-Aug-10 5:03
professionalBassam Abdul-Baki30-Aug-10 5:03 
GeneralRe: Dynamic Arrays Pin
harold aptroot30-Aug-10 5:05
harold aptroot30-Aug-10 5:05 
GeneralRe: Dynamic Arrays Pin
Bassam Abdul-Baki30-Aug-10 5:19
professionalBassam Abdul-Baki30-Aug-10 5:19 
GeneralRe: Dynamic Arrays Pin
harold aptroot30-Aug-10 5:25
harold aptroot30-Aug-10 5:25 
GeneralRe: Dynamic Arrays Pin
JasonPSage31-Aug-10 5:05
JasonPSage31-Aug-10 5:05 
In all the languages I've coded, there seems to be a general rule of thumb when looking at linked lists versus arrays and dynamic arrays.

Double Linked Lists are better at adding and removing items a lot - but overall searches and navigation is slower than navigating an array; where an array is much faster for navigating hands down making searching, sorting etc just faster.

Where the dynamic arrays get slow is when adding items exceeds the "chunk" and the array needs to make a full copy of itself in a new memory location with a new empty chunk. By Chunk I mean the number of array elements that are allocated but not yet used.. and as you fill the array.. you eventually hit this limit and adding one more item will cause this "thunking" I'm talking about. (Look up on Wiki what thunking is... the definition kind of applies here).

How .Net implements their dynamic arrays under the hood I am not certain but I would imagine it's not different by much as these are pretty standard data configurations in any system I've used thus far. The fact that .Net has both lists and arrays indicates this is probably spot on.

It seems like everything in programming is a choise of the right tool for the job. Deciding can be tricky - especially when both ways apply.

Good Luck!
Know way too many languages... master of none!

GeneralSlimList Pin
AspDotNetDev31-Aug-10 5:08
protectorAspDotNetDev31-Aug-10 5:08 
GeneralRe: SlimList Pin
Bassam Abdul-Baki31-Aug-10 5:25
professionalBassam Abdul-Baki31-Aug-10 5:25 
GeneralRe: SlimList Pin
Bassam Abdul-Baki31-Aug-10 5:30
professionalBassam Abdul-Baki31-Aug-10 5:30 
GeneralRe: SlimList Pin
Bassam Abdul-Baki2-Sep-10 14:48
professionalBassam Abdul-Baki2-Sep-10 14:48 
GeneralRe: SlimList Pin
AspDotNetDev2-Sep-10 20:10
protectorAspDotNetDev2-Sep-10 20:10 
GeneralRe: SlimList Pin
Bassam Abdul-Baki4-Sep-10 10:47
professionalBassam Abdul-Baki4-Sep-10 10:47 
QuestionChange/Read Language used for Non-Unicode Programs Pin
jojoba201130-Aug-10 3:14
jojoba201130-Aug-10 3:14 
AnswerRe: Change/Read Language used for Non-Unicode Programs Pin
Dave Kreskowiak30-Aug-10 3:58
mveDave Kreskowiak30-Aug-10 3:58 
QuestionRe: Change/Read Language used for Non-Unicode Programs Pin
jojoba201130-Aug-10 4:08
jojoba201130-Aug-10 4:08 
AnswerRe: Change/Read Language used for Non-Unicode Programs Pin
Dave Kreskowiak30-Aug-10 11:56
mveDave Kreskowiak30-Aug-10 11:56 
Questionabout text editor. only text editor, not server or .... Pin
Fred 3429-Aug-10 23:11
Fred 3429-Aug-10 23:11 
GeneralRe: about text editor. only text editor, not server or .... Pin
Bigdeak29-Aug-10 23:35
Bigdeak29-Aug-10 23:35 
GeneralRe: about text editor. only text editor, not server or .... Pin
Fred 3431-Aug-10 2:34
Fred 3431-Aug-10 2:34 
AnswerRepost PinPopular
Pete O'Hanlon30-Aug-10 0:35
mvePete O'Hanlon30-Aug-10 0:35 
AnswerRe: about text editor. only text editor, not server or .... [modified] Pin
PIEBALDconsult30-Aug-10 3:16
mvePIEBALDconsult30-Aug-10 3:16 
AnswerRe: about text editor. only text editor, not server or .... Pin
Eddy Vluggen30-Aug-10 8:54
professionalEddy Vluggen30-Aug-10 8:54 
QuestionParallel and Thread running some mission ( code attached ) Pin
Yanshof29-Aug-10 22:49
Yanshof29-Aug-10 22:49 

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.