Blender Git Commit Log

Git Commits -> Revision 1c44d08

Revision 1c44d08 by Jacques Lucke (master)
September 13, 2019, 08:06 (GMT)
BLI: new C++ hash table data structures

This commit adds some new hashing based data structures to blenlib.
All of them use open addressing with probing currently.
Furthermore, they support small object optimization, but it is not
customizable yet. I'll add support for this when necessary.
The following main data structures are included:

A collection of values, where every value must exist at most once.
This is similar to a Python `set`.

A combination of a Set and a Vector. It supports fast search for
elements and maintains insertion order when there are no deletes.
All elements are stored in a continuous array. So they can be
iterated over using a normal `ArrayRef`.

A set of key-value-pairs, where every key must exist at most once.
This is similar to a Python `dict`.

A special map for the case when the keys are strings. This case is
fairly common and allows for some optimizations. Most importantly,
many unnecessary allocations can be avoided by storing strings in
a single buffer. Furthermore, the interface of this class uses
`StringRef` to avoid unnecessary conversions.

This commit is a continuation of rB369d5e8ad2bb7.

Commit Details:

Full Hash: 1c44d08a69eb3e66c7f942d748f549d6b8ca138f
Parent Commit: 8d12c2a
Lines Changed: +3037, -0

By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2020