4 ms·
Any idea what's going on with the mem values in the listing in your second link? Wouldn't expect a C++ implementation to use 200x the memory of a C implementat
by MaxBarraclough 7y ago
Any idea what's going on with the mem values in the listing in your second link?
Wouldn't expect a C++ implementation to use 200x the memory of a C implementation. Different algorithms presumably? Or a significant compiler optimisation being missed?
- heeen2 7y agoMaybe because the cpp version includes stdlib on top of stdio?
- MaxBarraclough 7y agoAh, of course. So the problem doesn't involve any real allocations, and it's just the language overhead that we're seeing.