-
- Downloads
PERF: Avoid allocation induced by VLV pixels
The `DifferenceImageFilter` is often used on `VectorImage`s, in particular when doing `compare-image`. Creating new `VariableLengthVector` pixels at each iteration, or casting them will automatically end up in construction and destruction of VLV pixels, and thus allocation and liberation of heap memory. This is not efficient. This commit aims at minimizing the number of allocation by factorizing out everything that can be (pixel size, typical max value, typical zero value). Resetting value is done by assignment, which has the good property of not inducing any allocation on VLV variables.
Loading
Please register or sign in to comment