Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

2 decades ago by Indiepath

Has anyone already implemented Linked Lists? I did a search of the forums but could not find anything.

Thanks in advance,

Tim.

2 decades ago by Indiepath

No worries : http://impactjs.com/forums/code/doubly-linked-list

2 decades ago by dominic

Did you do any benchmarks? I somehow doubt that this will be faster or more memory efficient than native Arrays in JavaScript.

2 decades ago by Indiepath

Hi, these are not meant to be faster or more memory efficient than other storage methods - they are what they are :)

http://en.wikipedia.org/wiki/Linked_list#Linked_lists_vs._dynamic_arrays

2 decades ago by dominic

So if they are not faster or more memory efficient and provide even less features than native Arrays (e.g. no random access), what are they meant to?

Linked lists make a lot of sense in low level languages where they can provide a certain set of features in a very efficient manner. Not so much in JS.

2 decades ago by Indiepath

I don't really want to get into a debate about performance and efficiencies. I need linked lists for managment of certain assets - others may need them too, that is why I shared my code.
Page 1 of 1
« first « previous next › last »