Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^2: Linked lists as arrays: inserting values

by radiantmatrix (Parson)
on Sep 25, 2006 at 22:58 UTC ( #574841=note: print w/replies, xml ) Need Help??

in reply to Re: Linked lists as arrays: inserting values
in thread Linked lists as arrays: inserting values

Pretty close... I'm a little leery of premature optimization, I just wanted to avoid doing something stupid.

A collection of thoughts and links from the minds of geeks
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet
  • Comment on Re^2: Linked lists as arrays: inserting values

Replies are listed 'Best First'.
Re^3: Linked lists as arrays: inserting values
by jdporter (Canon) on Sep 26, 2006 at 01:44 UTC

    I should have said heuristics, rather than optimizations. For example, if the point of the next insertion is usually "very close" to the previous insertion, you can make a significant improvement in the performance (e.g. O(n) vs O(n log n)). At any rate, choosing a O(n) algorithm up front instead of a O(n log n) algorithm shouldn't be dismissed as "premature". It could be, in fact, a well-timed optimization of your development process. :-)

    We're building the house of the future together.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://574841]
[choroba]: Hey
[Discipulus]: all is well.. flying home
[Eily]: if I had a flying home I would be rather concerned I think

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2018-02-21 17:31 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (285 votes). Check out past polls.