diff options
author | Hans Goudey <h.goudey@me.com> | 2021-08-30 06:12:53 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-08-30 06:12:53 +0300 |
commit | 41eb33794ccd977582185159791805c84730a957 (patch) | |
tree | f9be384b153d8dbb538c3b946d2b5c172dbc4bf7 /source/blender/nodes | |
parent | b44406f9634a35ebe0b4fd334715d63e75af08a0 (diff) |
Cleanup: Add comment about suspicious O(n^3) loop
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc index ccf7065f7b0..1de3942b462 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc @@ -90,6 +90,10 @@ static void calculate_vertices(const CuboidConfig &config, MutableSpan<MVert> ve int vert_index = 0; + /* Though looping over all possible coordinates inside the cube only to skip them may be slow, + * the alternative is similar complexity to below in the poly index calculation. If this loop + * becomes a problem in the future it could be optimized, though only after proper performance + * testing. */ for (const int z : IndexRange(config.verts_z)) { for (const int y : IndexRange(config.verts_y)) { for (const int x : IndexRange(config.verts_x)) { |