Blender Git Commit Log

Git Commits -> Revision c646cf5

Revision c646cf5 by Jacques Lucke (lineart-shadow)
December 8, 2021, 06:53 (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: c646cf5378e97d22c984f1c6e020f4dc33d95cb8
Parent Commit: ac633ee
Committed By: YimingWu
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