"Python solves the same problem as C++... 70 times slower"
C++ and Python are incredibly different programming languages, but they're more alike than you might think. Bjarne Stroustrup, who created C++, said on a recent podcast that Python serves the same "fundamental needs" that he was serving when he created his language.
đ„Follow us on WhatsApp for news alerts.đ„
Speaking to ex-Meta engineer Ryan Peterman, Stroustrup said he wanted something that had "high and low-level facilities in the same language" when building C++. Python is an innately high-level language, but has an abundance of libraries which provide low-level performance. Stroustrup says that C++ is "the reason [Python] is viable," since those libraries are mostly written in either C++ or C.
Python may be boosted by C++ but it can rarely compete in terms of speed. Stroustrup said that, even when boosted by C++, Python "runs something like 70 times slower." Older studies have suggested that Python is up to 57 times slower than C++ for basic programs. Mojo, a superset of Python, is trying to close that gap, but it's yet to fully take off.
Python is better for experimentation. Stroustrup said this is "because you don't have to know enough about the language. You don't have to know about type systems." He said that C++ is a language for computer scientists, while Python serves a wider breadth of people, from web developers to physicists.
In quant finance and electronic trading, where some of the most lucrative engineering jobs on earth can be found, there's a notion that Python is like a toy programming language. This can be a good thing; Jane Street has become enamoured with Python in a machine learning context, as it allows their traders to iterate through ideas quickly, then offload the best ones to low-level technologists to build that strategy out.
Which language should you learn? Perhaps both; Stroustrup said "it's not good for you to be monoglot," since you get stuck in the trends and ideas of that language's community. He said you should "broaden your mind with ideas and techniques," since engineers need to build things.
Have a confidential story, tip, or comment youâd like to share? Contact: WhatsApp: http://wa.me/442079977910 (+44 20 7997 7910), Telegram: @AlexMcMurray, Signal: @AlexMcMurrayEFC.88 Click here to fill in our anonymous form, or email editortips@efinancialcareers.com.
Bear with us if you leave a comment at the bottom of this article: comments are moderated intermittently by human beings. Sometimes these humans might be asleep, or away from their desks, so it may take a while for your comment to appear. You must take sole responsibility for comments you post on this site. We will take reasonable steps to weed out anything that we consider to be offensive or inappropriate.