Closed YoshuaNava closed 2 years ago
thanks, I will repeat the benchmark!!!
I applied your changes, thanks!
But my results are as follow:
------------------------------------------------------------------
Benchmark Time CPU Iterations
------------------------------------------------------------------
Treexy_IterateAllCells 20474 ns 20459 ns 32595
Octomap_IterateAllCells 230635 ns 230507 ns 2985
OpenVDB_IterateAllCells 55311 ns 55224 ns 12229
Could it be that you did not compile in Release?
@facontidavide You're right, I usually build with the RelWithDebInfo
flag. What you show in your latest update is an impressive amount of iterations, wow!
I found that the OpenVDB benchmark for iterating over all cells was using a voxel-On iterator, which is user-friendly, safe, and fast, but not super fast. After running the benchmarks:
Reading through this post from the OpenVDB mailing list: https://lists.aswf.io/g/openvdb-dev/topic/32212211?p=,,,20,0,0,0::,,,0,0,0,32212211
I found that there is a class called LeafManager that allows access leaping from leaf to leaf, which also grants the chance of iterating over the voxels below a given leaf (similar to what Bonxai is doing):
I ran the benchmarks with this modification and observed a solid improvement:
Furthermore, by switching the tree configuration to
openvdb::tree::Tree3<int32_t, 4, 2>::Type;
, I was able to get results that almost match those of Bonxai:And when enabling multi-threaded access: