-
Notifications
You must be signed in to change notification settings - Fork 1
dynamicEDT3DPerformance
As of this writing, the best tool for this use case seems to be tsl::sparse_map. It has the fastest access time (almost 1/2 that of the nearest competitor) and uses an order of magnitude less ram than the nearest. It's biggest disadvantage was construction time (not recorded because it was not deemed important for our use case, just needed to be reasonable).
Lookup speed was calculated by recording the time taken to compare point clouds consisting of about 26000 points and extrapolating to 1 second.
Ram usage was taken by interpreting the results of the valgrind massif tool using massif-visualizer. Tests were run on a Zbook with an Intel® Core™ i7-6820HQ CPU @ 2.70GHz × 8 and 15.5 GBs of ram (about 6GBs available).
Storage method | Lookup Speed (millions/second) | RAM usage (MB) | Description |
---|---|---|---|
std::unordered_map<((int points) x, y, z), float> | 6.6 | 300 | Map was passed a has created by using boost::hash_combine on each point dimension |
octree storing float | 4.7 | 220 | Full octree space was NOT filled. Max dist points were not written into tree |
tsl::sparse_map<int hashvalue, float> | 13.7 | 28.8 | x, y, z point dimensions are hashed into the hashvalue using boost::hash_combine. Taken care of via wrapper instead of directly using point type and giving tsl the hash function. |
opencv sparceMat | 4.6 | 517 | --- |
octomap storing xyz nearest neighbor | 6.4 | 288 | --- |
octomap storing xyz nearest neighbor* | 6.4 | 544 | This map stored points corresponding to maxdist |
Caveat here is that the pointcloud used is not expected to match well with the map data.
Note that this map took about 100 seconds to process into the initial map containing datacell
types and took up 1.7 GBs of ram.
Storage method | Lookup Speed (millions/second) | RAM usage (MB) | Compression time (s) |
---|---|---|---|
tsl::sparse_map<int hashvalue, float> | 9.2 | ~158.2 | 6 |
Caveat here is that the pointcloud used is not expected to match well with the map data.
Uncompressed map construction took 578 seconds and used 7GBs of ram. Upon switching this map to tsl::sparse_map as well, the construction time dropped to 19 seconds with about 343MB used.
Storage method | Lookup Speed (millions/second) | RAM usage (MB) | Compression time (s) |
---|---|---|---|
tsl::sparse_map<int hashvalue, float> | 31.4 | ~205 | 29 |