in reply to Re^2: Array VS Linked List
in thread Array VS Linked List

Thanks Fletch, I'm going to comp performance between using an array and a linked list. BTW, to dragonchild, an example of what I want to avoid is the added CPU usage when inserting characters into the middle of the array. Lets say my user decides to paste a block of text into the middle of the document. The bigger the array is the more CPU it uses to do so. Right now I'm seeing significant (to me) CPU usage when this occurs, and since my intent for this project is to be entirely non-blocking, I figure I may as well do everything I can to drop any unecessary CPU usage. From what I'm seeing, I certainly have to question your statement about a perl array being a linked list, as it certainly doesnt perform like one.

Replies are listed 'Best First'.
Re^4: Array VS Linked List
by mrpeabody (Friar) on Nov 19, 2007 at 20:50 UTC
    Lets say my user decides to paste a block of text into the middle of the document. The bigger the array is the more CPU it uses to do so. Right now I'm seeing significant (to me) CPU usage when this occurs,

    You said you were developing a "win32 shell", but now people can use it to edit documents? What kind of application is this exactly? What kind of data are these arrays holding, how big are they, and what operations are you performing on them?

    If you describe the application and show some code, we can make better recommendations to help your performance problems. It might even turn out that the array operations aren't the bottleneck at all.