Skip to main content

Command Palette

Search for a command to run...

Comparison of 5 most common programming languages

The execution time, startup time, type system, memory management, concurrency of C, C#, C++, Java, and Python

Published
1 min read
Comparison of 5 most common programming languages
A

I’m Anni Huang, an AI researcher-in-training currently at ByteDance, specializing in LLM training operations with a coding focus. I bridge the gap between engineering execution and model performance, ensuring the quality, reliability, and timely delivery of large-scale training projects.

Execution Time

RAM Efficiency

Go and C++ are not efficient in RAM usage, but they are fast at execution. There is always a trade-off on memory and speed.

Starup Time

Except C# and Java, others look okay

Memory Management Models

Automatic (Garbage Collected)

  • Python: Reference counting + cycle detection

  • Java: Generational GC, highly optimized

  • Go: Concurrent, low-latency GC

  • C#: Generational GC, similar to Java

Manual

  • C: malloc/free - full control, full responsibility

  • C++: RAII + smart pointers (modern C++)

Concurrency Models

LanguageModelStrengthsLimitations
PythonThreading + AsyncIOSimple async/awaitGIL limits CPU parallelism
JavaThreads + ExecutorsMature, well-testedComplex threading model
GoGoroutines + ChannelsExcellent, built-inLearning curve for channels
CpthreadsFull controlManual, error-prone
C#Tasks + async/awaitClean, modernWindows-centric history
C++std::thread + futuresFlexible, performantComplex, manual

Type System