From 6bef2559047461794eb3ff27de15f4caf5ddcf1e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 14 Jun 2021 22:56:02 +1000 Subject: BMesh: remove unit-length edge-vector cache from normal calculation Bypass stored edge-vectors for ~16% performance gains. While this increases unit-length edge-vector calculations by around ~4x the overhead of a parallel loop over all edges makes it worthwhile. Note that caching edge-vectors per-vertex performs better and may be worth investigating further, although in my tests this increases code complexity with barley measurable benefits over not using cache at all. Details about performance and possible optimizations are noted in bm_vert_calc_normals_impl. --- source/blender/bmesh/intern/bmesh_mesh_partial_update.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source/blender/bmesh/intern/bmesh_mesh_partial_update.h') diff --git a/source/blender/bmesh/intern/bmesh_mesh_partial_update.h b/source/blender/bmesh/intern/bmesh_mesh_partial_update.h index b31ec127744..3dbfb985e92 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_partial_update.h +++ b/source/blender/bmesh/intern/bmesh_mesh_partial_update.h @@ -44,10 +44,8 @@ typedef struct BMPartialUpdate_Params { */ typedef struct BMPartialUpdate { BMVert **verts; - BMEdge **edges; BMFace **faces; int verts_len, verts_len_alloc; - int edges_len, edges_len_alloc; int faces_len, faces_len_alloc; /** Store the parameters used in creation so invalid use can be asserted. */ -- cgit v1.2.3