-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use local loop variable in copyFromFrameBuffer
This change allows the compiler to keep the loop variable (readPtr) in a register and therefore avoid cache miss in what is essentially a more general memcpy. By analysing the assembly generated by both gcc 6.3.1, gcc 4.8.5 and clang 5.0 I found that these compilers interpret the mutable reference such that it has to be written back into memory in every iteration. The performance regression was when upgrading the compilers for Foundry's Nuke. Our original build of OpenEXR 2.2.0 built with GCC 4.1.2 did not exhibit this behaviour. It yielded significant speed up in Nuke's writing speed. Signed-off-by: Gyula Gubacsi <gyula.gubacsi@foundry.com>
- Loading branch information
Showing
1 changed file
with
25 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters