View on GitHub

basic_language_comparison

Basic Comparison of Various Computing Languages

Python, Julia, Matlab, IDL, R, Java, Scala, C, Fortran


Authors:

DOI


We use simple test cases to compare various high level programming languages (Python, Julia, Matlab, IDL, R, Java, Scala, C, Fortran). We implement the test cases from an angle of a novice programmer who is not familiar with the optimization techniques available in the languages. The goal is to highlight the strengths and weaknesses of each language but not to claim that one language is better than the others.


Background Information

Check the following docyments to obtain background information on this project:

List of Test Cases

The test cases are listed in categories that include:

Each test is “simple” enough to be quickly written in any of the languages and is meant to address issues such as:

The source files are contain in the directories:

  C\    Fortran\  IDL\  Java\  Julia\  Matlab\  Python\  R\  Scala\

There is also a directory Data that contains a Python script that generates the NetCDF4 files needed for the test case on reading a large collection of files. It also has sample text files for the Count Unique Words in a File test case.

Loops and Vectorization

String Manipulations

Numerical Computations

Input/Output

Results

September 2019

Language Version
Python 3.7
Julia 0.6.2
Java 10.0.2
Scala 2.13.0
IDL 8.5
R 3.6.1
Matlab R2017b
GNU Compilers 9.1

Histogram (Sep2019

Scatter Plot (Sep2019

May 2020

Language Version
Python 3.7
Numba 0.45.1
Julia 1.2
Java 13.0.1
Scala 2.13.2
IDL 8.5
R 3.6.3
Matlab R2020a
GNU Compilers 9.3.0

Histogram (May2020

Scatter Plot (May2020

August 2021

Language Version
Python 3.9
Numba 0.53.1
Julia 1.6.2
Java 15
Scala  
IDL 8.5
R 4.1.0
Matlab R2020a
GNU Compilers 11.1.0

Histogram (Aug2021

Scatter Plot (Aug2021