Continuing from last time, today we’ll greatly expand on the fledgling
NativeLinkedList<T> that we started last time. By the end of the article, we’ll have a useful native collection available to us!
Posts Tagged linkedlist
Unity 2018.1 shipped with just one true native container:
NativeArray<T>. Now Unity 2018.2 has been released and there is still just the one native container. We’ve seen how to implement more, but never wrote much more than a proof of concept. Today we’ll begin implementing
NativeLinkedList<T> as an example of a native container for a very well known, simple data type. The result is available on GitHub for any project to use.
Contrary to what you may have learned in a data structures class, linked lists are virtually always slower than just using arrays. The same goes for array wrapper classes like
List. Today’s article discusses why this is the case and tests it out with a C# Unity app to make sure that the real world validates the theory.
Linked lists can be much faster than AS3’s
Vector classes if you use them under the right circumstances. It’s been over a year and a half since I last visited the topic, but today it’s time to update my
LinkedList class. Read on for the freshly-optimized code and all-new performance testing and analysis!
Last time I began covering linked lists in AS3. As anyone who has ever taken a data structures class can tell you, this is definitely a core data structure. As such, it has numerous benefits compared to other single-dimensional data structures like arrays and hash tables. The Array class in AS3 is far from a C/C++ array, which is simply a contiguous block of memory. AS3’s Array class blurs the lines between arrays, linked lists, and hash tables. So as I implement a linked list class in AS3 it is quite interesting to see how the normal pros and cons change. I’ve expanded on the LinkedList class I started last week and done some more preliminary performance testing. Read on to see the updates.