This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/blenkernel
Jeroen Bakker 042143440d LatticeDeform: Performance
This patch improves the single core performance of the lattice deform.

1. Prefetching deform vert during initialization. This data is constant for
   each innerloop. This reduces the complexity of the inner loop what makes
   more CPU resources free for other optimizations.
2. Prefetching the Lattice instance. It was constant. Although performance
   wise this isn't noticeable it is always good to free some space in the
   branch prediction tables.
3. Remove branching in all loops by not exiting when the effect of the loop
   isn't there. The checks in the inner loops detected if this loop didn't
   have any effect on the final result and then continue to the next loop.
   This made the branch prediction unpredictable and a lot of mis
   predictions were done. For smaller inner loops it is always better
   to remove unpredictable if statements by using branchless code patterns.
4. Use SSE2 instruction when available.

This gives 50% performance increase measured on a
Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz with GCC 9.3.
Also check other compilers.

Before:
```
performance_no_dvert_10000 (4 ms)
performance_no_dvert_100000 (30 ms)
performance_no_dvert_1000000 (268 ms)
performance_no_dvert_10000000 (2637 ms)
```

After:
```
performance_no_dvert_10000 (3 ms)
performance_no_dvert_100000 (21 ms)
performance_no_dvert_1000000 (180 ms)
performance_no_dvert_10000000 (1756 ms)
```

Reviewed By: Campbell Barton

Differential Revision: https://developer.blender.org/D9087
2020-10-26 11:02:03 +01:00
..
2020-10-26 11:02:03 +01:00
2020-10-19 08:12:33 -07:00
2020-09-30 11:51:13 +10:00
2020-10-19 08:12:33 -07:00
2020-10-01 14:29:45 +02:00
2020-10-19 08:12:33 -07:00
2020-09-30 11:51:13 +10:00
2020-09-30 11:51:13 +10:00
2020-10-07 15:24:12 +02:00
2020-10-19 08:12:33 -07:00
2020-08-20 16:09:48 +10:00
2020-09-30 11:51:13 +10:00
2020-10-19 09:11:00 -07:00
2020-10-26 11:02:03 +01:00