I would like to improve my code performance by replacing a red-black tree with any other data structure. I am having this red-black tree in memory, not on disk. Could you suggest other options which are faster than a red-black tree in terms of search, insertion and deletion?
Best How To :
What do you use the RB tree for? If you need the objects you're storing to respect a sorting criterion, then your RB Trees are probably a better option. However, I suggest using STL's containers which are implemented using balanced BSTs std::map and std::set.
If you don't care about objects ordering, then use a HashTable. C++11 introduced std::unordered_map and std::unordered_set which have constant insert and look up time in average.