diff options
author | Hans Goudey <h.goudey@me.com> | 2022-08-31 00:44:47 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-08-31 00:45:00 +0300 |
commit | 4c91c24bc7cbe2c4f97be373025a672928a5676d (patch) | |
tree | 6472225e425c6d5ba52feff1478bc2e9e04b1a6e /source/blender/blenkernel/intern/curves_geometry.cc | |
parent | cccc6d6905be7ac32cbe8649faf6b17e9c9f636e (diff) |
Attributes: Avoid unnecessarily initializing new attributes
The "write_only" (i.e. no reading) API function expects the caller to
set values for all new attribute elements, so using calloc or setting
the default value first is redundant. In theory this can improve
performance by avoiding an extra pass over the array. I observed a
6% improvement in a basic test with the mesh to points node:
from 47.9ms to 45ms on average.
See 25237d2625078c6d for more info.
Similar to cccc6d6905be7ac.
Diffstat (limited to 'source/blender/blenkernel/intern/curves_geometry.cc')
0 files changed, 0 insertions, 0 deletions