What is a typical query for your table?
Try using hashmap, it can be faster for large tables.
How to save names and IP address? Utf string char *? Ip like uint32 or string?
For readonly structures with a large number of read requests, you can use several threads.
upd: use std::unordered_multimap from #include <tr1/unordered_map>
source share