Today’s article is about a new native collection type: NativeChunkedList<T>. This type is great when you need a dynamically-resizable array that’s fast to add to and doesn’t waste a lot of memory. Read on to see how it’s implemented, see the performance report, and get the source code.
Posts Tagged native collection
Last week’s article introduced two new native collection types:
NativeLongPtr. These were useful for both
IJobParallelFor jobs, but performance was degraded in
IJobParallelFor. Today we’ll remedy that, explore some more aspects of Unity’s native collection and job systems, and learn more about CPU caches along the way.
Last time in the series we encountered and overcame a host of esoteric issues on our path to a better understanding of Unity’s native collection system. This week we’ll continue on that journey and grapple with even more challenges in this new, unexplored area of Unity.
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.