« Reading List: The Weed Agency | Main | Floating Point Benchmark: Erlang Language Added »

Friday, June 13, 2014

Floating Point Benchmark: Simula Language Added

I have posted an update to my trigonometry-intense floating point benchmark which adds Simula to the list of languages in which the benchmark is implemented. A new release of the benchmark collection including Simula is now available for downloading.

Simula may be the most significant computer language of which you've never heard. In the 1960s, it introduced almost all of the essential concepts of object oriented programming: classes, inheritance, virtual procedures, and included facilities for discrete event simulation. Memory management includes dynamic storage allocation and garbage collection. When programming in Simula, one has the sense of using a computer language of the 1990s which somehow dropped into the 1960s, retaining some of the archaic syntax of that epoch. (What was it about academic language designers of the era that they did not appreciate the value of initialising variables and declaring symbolic constants? COBOL had both from inception.) In fact, although few programmers were aware of Simula, it was well known among the computer science community and language designers and was the direct inspiration for languages such as C++, Objective C, Smalltalk, and Java. Had it not been relegated to the niche of a “simulation language”, we might have been writing object oriented code since the early 1970s. So it goes.

The relative performance of the various language implementations (with C taken as 1) is as follows. All language implementations of the benchmark listed below produced identical results to the last (11th) decimal place.

Language Relative
Time
Details
C 1 GCC 3.2.3 -O3, Linux
Visual Basic .NET 0.866 All optimisations, Windows XP
FORTRAN 1.008 GNU Fortran (g77) 3.2.3 -O3, Linux
Pascal 1.027
1.077
Free Pascal 2.2.0 -O3, Linux
GNU Pascal 2.1 (GCC 2.95.2) -O3, Linux
Java 1.121 Sun JDK 1.5.0_04-b05, Linux
Visual Basic 6 1.132 All optimisations, Windows XP
Haskell 1.223 GHC 7.4.1-O2 -funbox-strict-fields, Linux
Ada 1.401 GNAT/GCC 3.4.4 -O3, Linux
Go 1.481 Go version go1.1.1 linux/amd64, Linux
Simula 2.099 GNU Cim 5.1, GCC 4.8.1 -O2, Linux
ALGOL 60 3.951 MARST 2.7, GCC 4.8.1 -O3, Linux
Lisp 7.41
19.8
GNU Common Lisp 2.6.7, Compiled, Linux
GNU Common Lisp 2.6.7, Interpreted
Smalltalk 7.59 GNU Smalltalk 2.3.5, Linux
Forth 9.92 Gforth 0.7.0, Linux
COBOL 12.5
46.3
Micro Focus Visual COBOL 2010, Windows 7
Fixed decimal instead of computational-2
Algol 68 15.2 Algol 68 Genie 2.4.1 -O3, Linux
Python 17.6 Python 2.3.3 -OO, Linux
Perl 23.6 Perl v5.8.0, Linux
Ruby 26.1 Ruby 1.8.3, Linux
JavaScript 27.6
39.1
46.9
Opera 8.0, Linux
Internet Explorer 6.0.2900, Windows XP
Mozilla Firefox 1.0.6, Linux
QBasic 148.3 MS-DOS QBasic 1.1, Windows XP Console

The Simula benchmark was developed and run under the GNU Cim 5.1 Simula to C translator. C code was compiled with GCC 4.8.1 with -O2 for the x86_64 architecture. There is no reason to believe a purpose-built optimising Simula compiler could not perform as well as a present-day C++ compiler.

Posted at June 13, 2014 14:26