-
-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PERF: Make
ImageRegion
trivially copyable, remove inheritance (FUTURE)
Made `ImageRegion` more lightweight, by declaring all of its member functions non-virtual, and by removing its inheritance from `Region`, when `ITK_FUTURE_LEGACY_REMOVE` is enabled. The size of `ImageRegion<2>` was observed to go down from 40 bytes (before this commit) to 32 bytes (after this commit), on Visual C++ 2022 (x64). A run-time performance improvement of more than 25% on default-constructing and destructing a sequence of `ImageRegion` objects was observed, by benchmarking `std::make_unique<itk::ImageRegion<2>[]>(n)`.
- Loading branch information
Showing
3 changed files
with
63 additions
and
9 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
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
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