The current implementation of PackedArray is not very fast, between 15 to 30,000 times slower than the original PackedArray, depending on the operation. The only benefit that the new version provides is unique IDs. The reason why it's slower, is because it uses two unordered_map's for keeping track of the indexes.
So, rewrite PackedArray again, so it only uses contiguous, true O(1) containers like std::vector. Use some versioning system and bit-shift IDs together, so that all IDs stay unique while still being fast. Also, don't use a free list if possible. Instead, use the holes of the index as a numeric linked list, to save memory and reduce allocations.
The current implementation of PackedArray is not very fast, between 15 to 30,000 times slower than the original PackedArray, depending on the operation. The only benefit that the new version provides is unique IDs. The reason why it's slower, is because it uses two unordered_map's for keeping track of the indexes.
So, rewrite PackedArray again, so it only uses contiguous, true O(1) containers like std::vector. Use some versioning system and bit-shift IDs together, so that all IDs stay unique while still being fast. Also, don't use a free list if possible. Instead, use the holes of the index as a numeric linked list, to save memory and reduce allocations.