Blender Git Loki

Git Commits -> Revision a70589e

Revision a70589e by Alexander Gavrilov (master)
November 5, 2018, 14:16 (GMT)
BLI_heap: optimize heap_swap, heap_down and heap_up.

The index field of nodes is supposed to be its actual index, so
there is no need to read it in swap. On a 64-bit processor i and
j are already in registers, so this removes two memory reads.

In addition, cache the tree pointer, use branch hints, and
put the most frequently accessed 'value' field at 0 offset.

Produced a 20% FPS improvement for a 50% heap-heavy workload.

Commit Details:

Full Hash: a70589e439b3fb00fb5c54971df823931a8d00eb
Parent Commit: 2d3493d
Lines Changed: +20, -8

1 Modified Path:

/source/blender/blenlib/intern/BLI_heap.c (+20, -8) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021