Closed ashishsingh18 closed 4 years ago
This seems good. Re: Sarthak's comments, I think this works either way, though pass by value requires a little more memory. I think the default copy constructor on the map would be shallow, so
std::map<std::string, std::vector<float>>*
should negate most memory impact while still being very quickly readable.
Yeah, no change is needed. What we have is correct and avoids duplication of memory.
This seems good. Re: Sarthak's comments, I think this works either way, though pass by value requires a little more memory. I think the default copy constructor on the map would be shallow, so
std::map<std::string, std::vector<float>>*
should negate most memory impact while still being very quickly readable.Yeah, no change is needed. What we have is correct and avoids duplication of memory.
Alright. The changes make sense; approved.
Fix #1369