5 ms·
I stopped reading after reading the first line of code containing a virtual function and smart pointers. Nothing is performance oriented in this post. It's just
by Galanwe 11y ago
I stopped reading after reading the first line of code containing a virtual function and smart pointers.
Nothing is performance oriented in this post. It's just a plain old dummy TCP server like anyone would write.
- dxhdr 11y agoI half agree; it's easy to be cynical. Virtual functions can be a terrible idea... if they are in a hot path. Is EchoHandler::read such a path? Maybe, you really can't say without profiling. If anything using std::string is the red flag for me.