Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f...
by panzi on Tuesday August 01, 2023 @11:38PM
(#36966697)
Interesting. Since the list is sorted, is the insertion still a linear search (O(N)) or now a binary search (O(log(N))? Or did I misunderstand something? Also, why is it not a hash table (almost O(1))?
[ Parent
| on HN ]
Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f...
by bssrdf on Wednesday August 02, 2023 @11:37AM
(#36972364)
Good point, I have the same doubt. Even if it is sorted, you still cannot do binary search on it unless using some skip list ideas. In fact, the code right now is doing linear search to find the ID given a name.
TBH, I don't fully understand how the ID linked list is utilized in Blender and why it needs to sorted by names. It seems some other data structure could also work, unless I missed something.