jsseng / herbie_rtabmap

BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Try to speed up stl::map creation #2

Open jsseng opened 3 years ago

jsseng commented 3 years ago

I added a directory test_code which has a small test program that adds elements to an stl::map. This happens a few times during loading (with about 1,000,000 elements each time) and it would be nice to have a way to have the map stored in contiguous memory so that it can be quickly loaded from disk.

I don't know how easy/hard this is, but I think it would involve using a custom allocator for the map. You can also try looking for an existing stl allocator library.