Quantcast
Channel: c++ execution time is slower than python's - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by Daniel Trugman for c++ execution time is slower than python's

$
0
0

C++'s advantage in comparison with Python doesn't lie in operations constrained by the OS such as printing to the console, but rather:

  • The fact is it hard typed, thus minimizing run-time overhead due to dynamic typing and type safety
  • The fact C++ is compiled (and highly optimized) and Python is (mostly) interpreted
  • In it's memory management model (Python uses managed objects that require garbage collection)
  • C++ can give you more control when implementing performance critical code (as far as using assembly and taking advantage of specific hardware)

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>