Cleanup: Add comment about suspicious O(n^3) loop

This commit is contained in:
Hans Goudey 2021-08-29 22:12:53 -05:00
parent b44406f963
commit 41eb33794c
1 changed files with 4 additions and 0 deletions

View File

@ -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)) {