Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualfir

Posted 14 September 2013 - 07:32 AM

Linked lists are good when you have interconnected data structures with pointers to each other. You can delete one thing without having to re-shuffle, and thus invalidate all the existing pointers in to the data you re-shuffled.

 

Intrusive lists with cells allocated from a pool help make them nicer to the cache.

 

this i could call maybe an array for content + list of pointers  not pure list maybe

 

When you would need such approach (interconnected with pointers) in practice ? Wouldnt it be easier rewrite it in array way stil?

 

(I am searching for the case when list is  really better than array because from my practic experiense it may seem, that it is a practically dead way of doing things - though maybe not, and I am writing oldschool c down here)


#2fir

Posted 14 September 2013 - 07:30 AM

Linked lists are good when you have interconnected data structures with pointers to each other. You can delete one thing without having to re-shuffle, and thus invalidate all the existing pointers in to the data you re-shuffled.

 

Intrusive lists with cells allocated from a pool help make them nicer to the cache.

 

this i could call maybe an array for content + list of pointers  not pure list maybe

 

When you would need such approach (interconnected with pointers) in practice ? Wouldnt it be easier rewrite it in 

array way stil?

(I am searching for the case when list is  really better than array because from my practic experiense it may seem, that it is a practically dead way of doing things - though maybe notm and I am writing oldschool c down here)


#1fir

Posted 14 September 2013 - 07:29 AM

Linked lists are good when you have interconnected data structures with pointers to each other. You can delete one thing without having to re-shuffle, and thus invalidate all the existing pointers in to the data you re-shuffled.

 

Intrusive lists with cells allocated from a pool help make them nicer to the cache.

 

this i could call maybe an array for content + list of pointers  not pure list maybe

When you would need such approach (interconnected with pointers) in practice ? Wouldnt it be easier rewrite it in 

array way stil? (I am searching for ythe case when list is

 really better than array becouse from my practic experiense

it may seem that it is a practically dead way of doing things

- though maybe not an I am writing oldschool c here)


PARTNERS