Monday, 21 October 2019

Experiment - Ranking of Programming Languages by Speed


SLIDE 01 - An experiment designed for fun, discussion and learning. How these languages compare given a particular task.

SLIDE 02 - Did not set out to optimize any of the code.

SLIDE 03 - I chose the 10 most popular languages in my mind.

SLIDE 04 - This is the task that each language was being judged on.

SLIDE 05 - These are the specs of my 3 year old budget laptop.

SLIDE 06 - Link to code on Github in description. I used the powershell command line to run all code and VS Code as the editor. No IDE was used. [ ]

SLIDE 07 - Keep in mind that there are differences and advantages and disadvantages between compiler and interpreter.

SLIDE 08 - Also note, a language can be implemented using another language e.g. Perl is implemented using C. A language is different from implementation and can have different implementations.

SLIDE 09 - Here are the results. Some of it surprising and some is NOT. What would you do differently? How would you rank the speed of these languages. Share feedback in the comments below.

SLIDE 10 - There are very little rankings out there. I found one ranking and it showed that energy efficiency not necessarily related to speed and performance.

SLIDE 11 - Thread safety is a characteristic of languages. PHP (for example) has a non thread safe version.

SLIDE 12 - I found python code (to me) to be the most readable and simple. Sometimes performance can be sacrificed for other reasons.

SLIDE 13 - How would you optimise the code to make it run faster? C++ code was optimised. Others have made comments on the internet about the slowness of cout.

SLIDE 14 - In competitive programming special attention is paid to performance and performance bugs.

SLIDE 15 - I found out that Go has the go run and go build commands and the Go blank identifier.

SLIDE 16 - Perl and Perl 6 are two completely different languages.

No comments: