Event Timeline
Comment Actions
This could be improved:
- You should not have to finalize the vnors in a second threaded pass, since at the end of mesh_calc_normals_poly_accum you know all the vertices in your range are completely accumulated, you can do normalization/copying to float there directly.
- Doing a quick loop over loops in mesh_calc_normals_poly_accum and only calling mesh_calc_normals_poly_accum_for_poly on first matching/valid loop if any.
Combined, those give me about 10% improvements... But this is still way slower than original code, so agree this is a dead end. ;)
Comment Actions
@Bastien Montagne (mont29) thanks for looking into this, feel free to update this paste (or submit new paste).
My concern with this method - generally is that some threads take longer than others, so the more work that's moved into each function call could hold up others.
Nevertheless if you managed to get a speedup over this patch, it could be worth including for reference.