Saturday, July 05, 2014

Programming Languages Performance: Scala, Go, F#, Java, C++...

Measuring performance - benchmark - is a difficult and tricky with programming languages. One important aspect is "human performance" that is how easy and quick is for a human programmer to make effective and efficient program.

Then there is a "test machine", effect of hardware and system software (OS) and tool (version of compilers etc). That is a job of engineers, "give me limitations to optimize solution".

Google Multi-Language Benchmark with F#:
multi-language-bench.googlecode.com/svn/trunk/doc/scaladays2011-paper/main.pdf
C++ : 23 sec
Java : 89 sec
Scala: 58 sec
Go : 126 sec

Google’s Multi-Language Benchmark in F# | Faisal's space
same algorithm ported on F#, different machines:
F# 31 sec on Core Duo 2.00 GHz
F# 20 sec on Core i5

Profiling Go Programs - The Go Blog
Same program tested on different environment:
C++ program runs in 17.80 seconds and uses 700 MB of memory.
Go program runs in 25.20 seconds and uses 1302 MB of memory.

The Go final version runs in 2.29 seconds and uses 351 MB of memory:
Then translated the final Go program into equivalent C++ code. Its execution time is similar to the Go program

The main optimization is avoiding memory management by VM.
I would not be surprised that Apple's Swift, that does not use VM, may have excellent performance in most cases...

www.csc.kth.se/utbildning/kth/kurser/DD143X/dkand12/Group6Alexander/final/Anders_Jarleberg_Kim_Nilsson.report.pdf
"Go, F# and Erlang"
This report examines the three languages Erlang, F# and Go, which
all have some form of inherent support for concurrency. T


No comments: