Skip to content

Store rolling grid as unordered_map instead of stacked vectors

Nicolas Cadart requested to merge perf/UseMapForRollingGrid into master

The voxels of the rolling grid are now stored using an std::unordered_map instead of std::vectors of std::vectors of std::vectors. This allows to only save the required voxels, leading to a sparse rolling grid. Looping over the 3 dimensions is therefore not needed anymore, as we can directly iterate on non empty voxels.

This brings a significant speed performance improvement of the RollingGrid operations. Typical speed gains on common datasets are:

  • Roll: 3x
  • Add (without the roll part): x1.5
  • Get (ROI): ~same
  • Get (all): x10

@julia.sanchez @nick.laurenson PTAL

Merge request reports

Loading