CS 301 Project Technical Blog
The general consensus about whether Python or C++ is slower, is that C++ is much more efficient. Many people have checked which language has better performance, but which just how much faster is C++, and is it always faster than Python? In this blog, I will show results of some experiments I did to answer these question, and will explore why C++ is generally faster than Python. Syntax Differences Python is well-known for how easy it is to write. Many argue that this makes it the better language to code with, but whether this difference really matters or not depends on personal preference and the coding situation that you are facing. This code block is from a short program that converts any decimal number to the hexadecimal equivalent. The syntax is easy to read compared to the following block of C++ code that performs the same functions. Key differences between these blocks are: Python uses dynamic types, C++ uses "declared" static types for variable declarations C++ has many...