PERF: Improve FunctorImageFilter performances
Summary
Improve slightly the performances of otb::ImageFunctorFilter
.
Rationale
otb::ImageFunctorFilter
with a lambda is slightly less performant than itk::UnaryFunctorImageFilter
with a dynamic functor.
Implementation Details
itk::UnaryFunctorImageFilter
only updates the progress reporter once per line.
This MR mimics ITK behaviour.
Results
The performance improvement is small, less than 10% on simple filters like a scaling filter that multiplies pixel values. The gap seems to have been filled.
Copyright
The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.
Check before merging:
- All discussions are resolved
- At least 2
votes from core developers, no vote. - The feature branch is (reasonably) up-to-date with the base branch
- Dashboard is green
- Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
Merge request reports
Activity
On the subject, does anybody know why something similar (C++14) to
std::apply([](auto&& it){ it.NextLine();}, InputIterators); // ~ C++17
hasn't been done along side
outIt.NextLine();
?Edited by Luc Hermittementioned in commit b28c5338
added refactoring label
changed milestone to %7.0.0
Please register or sign in to reply