Go vs Other Languages
Memory
| Go | CPP | |
|---|---|---|
| Memory Management | Go has Automatic Garbage Collection, which means memory allocation and deallocation are handled by the runtime |
CPP programmer has to do memory management using new, delete. |
| Structural Differences |
No hidden function as compared to c++
|
CPP have hidden functions, which can add overhead
|
| RunTime overhead | Less | More due to Exception handling, virtual function calls, and dynamic dispatch |