Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Is there linked list in u++?
Re: Is there linked list in u++? [message #28712 is a reply to message #28707] Mon, 13 September 2010 17:40 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
aftershock wrote on Mon, 13 September 2010 06:09

Why not?

It has special properlties, fastest insertion before and after an item.
Fastest deletion of an item.

If one needs that, it is the best...



The key question is:

Which element?

Going through the list to find the element you want to insert/remove will cost you much more time than insert/remove in Vector. (If you want to argue why, it is all about cache lines....)

The excelent usage for list, however, is in situation where objects are part of some list and insert/remove themselves (thus, no going through the list is required) or similar. However, list _container_ is absolutely unsuitable for such task.

That is why we have Link, but no List.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with gcc compilers and -Wall
Next Topic: [Fixed!] ScanUuid returns wrong value
Goto Forum:
  


Current Time: Wed Jun 05 13:50:55 CEST 2024

Total time taken to generate the page: 0.02173 seconds