Blender Git Commit Log

Git Commits -> Revision b32f9bf

Revision b32f9bf by Jacques Lucke (master)
December 5, 2021, 14:10 (GMT)
Geometry Nodes: use array instead of map in GeometrySet

`GeometrySet` contains at most one component of each type.
Previously, a map was used to make sure that each component
type only exists once. The overhead of a map (especially with
inline storage) is rather large though. Since all component types
are known at compile time and the number of types is low,
a simple `std::array` works as well.

Some benefits of using `std::array` here:
* Looking up the component of a specific type is a bit faster.
* The size of `GeometrySet` becomes much smaller from 192 to 40 bytes.
* Debugging a `GeometrySet` in many tools becomes simpler because
one can easily see which components exists and which don't

Commit Details:

Full Hash: b32f9bf801ec6cc0e3b40b87de16f34eba3f593e
Parent Commit: d194430
Lines Changed: +56, -56

3 Modified Paths:

/source/blender/blenkernel/BKE_geometry_set.h (+2, -0) (Diff)
/source/blender/blenkernel/BKE_geometry_set.hh (+2, -1) (Diff)
/source/blender/blenkernel/intern/geometry_set.cc (+52, -55) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021