Is it possible to implement lock free map in C++
We are developing a network application based C/S, we find there are too many locks adding to std::map that the performance of server became poor. I wonder if it is possible to implement a lock-free map, if yes, how? Is there any open source code there? EDIT: Actually we use the std::map to store sockets information, we did encapsulation based on the socket file description to include some other necessary information such as ip address, port, socket type, tcp or udp, etc. To summary, we have a global map say it's map<int fileDescriptor, socketInfor*> SocketsMap, then every thread which is used