4 ms·
Even the heroes eventually capitulate to complexity in C++, compromising performance. It is usually dead simple. Reserve memory in a vector, put data in, loop
by CyberDildonics 3y ago
Even the heroes eventually capitulate to complexity in C++, compromising performance.
It is usually dead simple. Reserve memory in a vector, put data in, loop through it linearly. Modern C++ is very simple most of the time. Where are you getting this idea?
It is virtually impossible to write a realistically complex zero-copy RPC server in C++ because the lifetime issues are too daunting.
This is not only untrue, it doesn't even make sense. What is it that you think can be done in java and what are these lifetime issues you think are in the way? You didn't give any actual technical examples, so feel free to show something real and back up this claim.
Even Go can beat C++ in this use case, for the same reasons
Prove it, let's see where these ideas are coming from, because I don't think they are coming from experience with C++.
The safety of the language in such cases is of no interest.
This is also overblown in modern C++. It is easy to boil things down to value semantics and let simple lifetimes manage resources with scope. When it isn't something you can do with scope and you have to manage resources yourself, the language won't help you anyway since you are writing it yourself.
- jeffbee 3y ago> Reserve memory in a vector, put data in You've already proven that you don't know what I am talking about and now you are doubling down. There is no way to put data into a std::vector without copying it. Vector can't adopt memory that already exists. So your plan doesn't suit the use case I am discussing: zero-copy RPC servers.
- CyberDildonics 3y agoFocus up, these are two different things. You said complexity, I said looping through a vector. You said "zero-copy RPC servers" (for some reason) but never gave any evidence of what you are saying or explained it technically in any way. I'll ask again, show me what is being done in java that can't be done in C++. Show me technically, prove what you are saying. I know how these conversations usually go. It's mostly the other person trying anything they can to not give evidence of what they're saying.