|
|
|
|
|
by philliphaydon
1205 days ago
|
|
Sure. Sometimes it’s wrong. But I spend less time finding an answer on ChatGPT than Google. For example I’m not a c++ developer but I’ve inherited some c++ code work to do. So I’m like wow this vector thing is only ever looking for this 1 value. It would be better to use a dictionary or hash map or something. So I ask ChatGPT and it recommended unordered_map, and I asked why the existing code snippet I gave it had a lock around it, and it explained the thread safety with read/write etc. So fixing that all up shaved off 700ms in processing time in my test scenario. I can ask it what’s the difference between 2 lists. I asked it about concurrent_unordered_set and it told me that it only exists in VisualC++ but if I want it cross platform I can look at Boost or TBB. None of this information is easy as a non C++ developer to find on Google. |
|