The Computer Language Benchmarks Game

Last updated

The Computer Language Benchmarks Game (formerly called The Great Computer Language Shootout) is a free software project for comparing how a given subset of simple algorithms can be implemented in various popular programming languages.

Contents

The project consists of:

Supported languages

Due to resource constraints, only a small subset of common programming languages are supported, up to the discretion of the game's operator. [1]

List of supported languages

Metrics

The following aspects of each given implementation are measured: [2]

It is common to see multiple solutions in the same programming language for the same problem. This highlights that within the constraints of a given language, a solution can be given which is either of high abstraction, is memory efficient, is fast, or can be parallelized better.

Benchmark programs

It was a design choice from the start to only include very simple toy problems, each providing a different kind of programming challenge. [3] This provides users of the Benchmark Game the opportunity to scrutinize the various implementations. [4]

History

The project was known as The Great Computer Language Shootout until 2007. [5]

A port for Windows was maintained separately between 2002 and 2003. [6]

The sources have been archived on GitLab. [7]

There are also older forks on GitHub. [8]

The project is continuously evolving. The list of supported programming languages is updated approximately once per year, following market trends. Users can also submit improved solutions to any of the problems or suggest testing methodology refinement. [9]

Caveats

The developers themselves highlight the fact that those doing research should exercise caution when using such microbenchmarks:

[...] the JavaScript benchmarks are fleetingly small, and behave in ways that are significantly different than the real applications. We have documented numerous differences in behavior, and we conclude from these measured differences that results based on the benchmarks may mislead JavaScript engine implementers. Furthermore, we observe interesting behaviors in real JavaScript applications that the benchmarks fail to exhibit, suggesting that previously unexplored optimization strategies may be productive in practice.

Impact

The benchmark results have uncovered various compiler issues. Sometimes a given compiler failed to process unusual, but otherwise grammatically valid constructs. At other times, runtime performance was shown to be below expectations, which prompted compiler developers to revise their optimization capabilities.

Various research articles have been based on the benchmarks, its results and its methodology. [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [ excessive citations ]

See also

Related Research Articles

<span class="mw-page-title-main">Java virtual machine</span> Java Virtual machine

A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes what is required in a JVM implementation. Having a specification ensures interoperability of Java programs across different implementations so that program authors using the Java Development Kit (JDK) need not worry about idiosyncrasies of the underlying hardware platform.

In computing, just-in-time (JIT) compilation is a way of executing computer code that involves compilation during execution of a program rather than before execution. This may consist of source code translation but is more commonly bytecode translation to machine code, which is then executed directly. A system implementing a JIT compiler typically continuously analyses the code being executed and identifies parts of the code where the speedup gained from compilation or recompilation would outweigh the overhead of compiling that code.

BeanShell is a small, free, embeddable Java source interpreter with object scripting language features, written in Java. It runs in the Java Runtime Environment (JRE), dynamically executes standard Java syntax and extends it with common scripting conveniences such as loose types, commands, and method closures, like those in Perl and JavaScript.

HotSpot, released as Java HotSpot Performance Engine, is a Java virtual machine for desktop and server computers, developed by Sun Microsystems and now maintained and distributed by Oracle Corporation. It features improved performance via methods such as just-in-time compilation and adaptive optimization.

JRuby is an implementation of the Ruby programming language atop the Java Virtual Machine, written largely in Java. It is free software released under a three-way EPL/GPL/LGPL license. JRuby is tightly integrated with Java to allow the embedding of the interpreter into any Java application with full two-way access between the Java and the Ruby code.

Programming languages are used for controlling the behavior of a machine. Like natural languages, programming languages follow the rules for syntax and semantics.

<span class="mw-page-title-main">Tiny C Compiler</span>

The Tiny C Compiler is an x86, X86-64 and ARM processor C compiler initially written by Fabrice Bellard. It is designed to work for slow computers with little disk space. Windows operating system support was added in version 0.9.23. TCC is distributed under the GNU Lesser General Public License.

<span class="mw-page-title-main">Java (software platform)</span> Set of computer software and specifications

Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems that provides a system for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers. Java applets, which are less common than standalone Java applications, were commonly run in secure, sandboxed environments to provide many features of native applications through being embedded in HTML pages.

In computer programming, a green thread is a thread that is scheduled by a runtime library or virtual machine (VM) instead of natively by the underlying operating system (OS). Green threads emulate multithreaded environments without relying on any native OS abilities, and they are managed in user space instead of kernel space, enabling them to work in environments that do not have native thread support.

In software development, the programming language Java was historically considered slower than the fastest 3rd generation typed languages such as C and C++. The main reason being a different language design, where after compiling, Java programs run on a Java virtual machine (JVM) rather than directly on the computer's processor as native code, as do C and C++ programs. Performance was a matter of concern because much business software has been written in Java after the language quickly became popular in the late 1990s and early 2000s.

The Dynamic Language Runtime (DLR) from Microsoft runs on top of the Common Language Runtime (CLR) and provides computer language services for dynamic languages. These services include:

<span class="mw-page-title-main">Da Vinci Machine</span>

The Da Vinci Machine, also called the Multi Language Virtual Machine, was a Sun Microsystems project aiming to prototype the extension of the Java Virtual Machine (JVM) to add support for dynamic languages.

<span class="mw-page-title-main">Clojure</span> Dialect of the Lisp programming language on the Java platform

Clojure is a dynamic and functional dialect of the Lisp programming language on the Java platform.

Nashorn is a JavaScript engine developed in the Java programming language originally by Oracle and later by the OpenJDK Community. It relies on the support for dynamically typed languages on the Java Platform Nashorn has been included with Java 8 through JDK 14.

asm.js is a subset of JavaScript designed to allow computer software written in languages such as C to be run as web applications while maintaining performance characteristics considerably better than standard JavaScript, which is the typical language used for such applications.

GraalVM is a Java VM and JDK based on HotSpot/OpenJDK, implemented in Java. It supports additional programming languages and execution modes, like ahead-of-time compilation of Java applications for fast startup and low memory footprint. The first production-ready version, GraalVM 19.0, was released in May 2019. The most recent version is GraalVM 22.1.0, made available in April 2022.

<span class="mw-page-title-main">Deeplearning4j</span> Open-source deep learning library

Eclipse Deeplearning4j is a programming library written in Java for the Java virtual machine (JVM). It is a framework with wide support for deep learning algorithms. Deeplearning4j includes implementations of the restricted Boltzmann machine, deep belief net, deep autoencoder, stacked denoising autoencoder and recursive neural tensor network, word2vec, doc2vec, and GloVe. These algorithms all include distributed parallel versions that integrate with Apache Hadoop and Spark.

<span class="mw-page-title-main">WebAssembly</span> Cross-platform assembly language and bytecode designed for execution in web browsers

WebAssembly defines a portable binary-code format and a corresponding text format for executable programs as well as software interfaces for facilitating interactions between such programs and their host environment.

References

  1. "The Computer Language Benchmarks Game". benchmarksgame-team.pages.debian.net/benchmarksgame. Retrieved 29 May 2018.
  2. "How programs are measured – The Computer Language Benchmarks Game". benchmarksgame-team.pages.debian.net/benchmarksgame/. Retrieved 29 May 2018.
  3. "Why toy programs? – The Computer Language Benchmarks Game". benchmarksgame-team.pages.debian.net/benchmarksgame. Retrieved 29 May 2018.
  4. "n-body description (64-bit Ubuntu quad core) – Computer Language Benchmarks Game". benchmarksgame-team.pages.debian.net/benchmarksgame. Retrieved 29 May 2018.
  5. "Trust, and verify – Computer Language Benchmarks Game". benchmarksgame-team.pages.debian.net/benchmarksgame. Retrieved 29 May 2018.
  6. "The Great Win32 Computer Language Shootout". Dada.perl.it. Retrieved 13 December 2017.
  7. "archive-alioth-benchmarksgame". salsa.debian.org/benchmarksgame-team. Retrieved 29 May 2018.
  8. Thiel, Sebastian (24 October 2017). "benchmarksgame-cvs-mirror: A git mirror of the benchmarksgame cvs repository". GitHub . Retrieved 13 December 2017.
  9. "Contribute your own program – Computer Language Benchmarks Game". benchmarksgame-team.pages.debian.net/benchmarksgame. Retrieved 29 May 2018.
  10. Kevin Williams; Jason McCandless; David Gregg (2009). "Dynamic Interpretation for Dynamic Scripting Languages" (PDF). Retrieved 25 March 2017.{{cite journal}}: Cite journal requires |journal= (help)
  11. Tobias Wrigstad; Francesco Zappa Nardelli; Sylvain Lebresne Johan; Ostlund Jan Vitek (January 17–23, 2009). Integrating Typed and Untyped Code in a Scripting Language (PDF). POPL’10. Madrid, Spain. Retrieved 25 March 2017.
  12. Lerche, Carl (April 17–18, 2009). Write Fast Ruby: It's All About the Science (PDF). Golden Gate Ruby Conference. San Francisco, California. Retrieved 25 March 2017.
  13. J. Shirako; D. M. Peixotto; V. Sarkar; W. N. Scherer III (2009). Phaser Accumulators: a New Reduction Construct for Dynamic Parallelism (PDF). IEEE International Symposium on Parallel & Distributed Processing. Retrieved 25 March 2017.
  14. Rajesh Karmani and Amin Shali and Gul Agha (2009). "Actor frameworks for the JVM platform: A Comparative Analysis" (PDF). In Proceedings of the 7th International Conference on the Principles and Practice of Programming in Java. Retrieved 26 March 2017.
  15. Brunthaler Stefan (2010). Inline Caching Meets Quickening. European Conference on Object-Oriented Programming (ECOOP). Vol. Object-Oriented Programming. pp. 429–451. doi:10.1007/978-3-642-14107-2_21.
  16. Prodromos Gerakios; Nikolaos Papaspyrou; Konstantinos Sagonas (January 23, 2010). Race-free and Memory-safe Multithreading: Design and Implementation in Cyclone (PDF). Proceedings of the 5th ACM SIGPLAN workshop on Types in language design and implementation. Madrid, Spain. pp. 15–26. Retrieved 25 March 2017.
  17. Slava Pestov; Daniel Ehrenberg; Joe Groff (October 18, 2010). Factor: A Dynamic Stack-based Programming Language (PDF). DLS 2010. Reno/Tahoe, Nevada, USA. Retrieved 25 March 2017.
  18. Andrei Homescu; Alex Suhan (October 24, 2011). HappyJIT: A Tracing JIT Compiler for PHP (PDF). DLS’11. Portland, Oregon, USA. Retrieved 25 March 2017.
  19. Vincent St-Amour; Sam Tobin-Hochstadt; Matthias Felleisen (October 19–26, 2012). Optimization Coaching – Optimizers Learn to Communicate with Programmers (PDF). OOPSLA’12. Tucson, Arizona, USA. Retrieved 25 March 2017.
  20. Wing Hang Li; David R. White; Jeremy Singer (September 11–13, 2013). JVM-Hosted Languages: They Talk the Talk, but do they Walk the Walk? (PDF). Proceedings of the 2013 International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools. Stuttgart, Germany. pp. 101–112. Retrieved 25 March 2017.
  21. Aibek Sarimbekov; Andrej Podzimek; Lubomir Bulej; Yudi Zheng; Nathan Ricci; Walter Binder (October 28, 2013). Characteristics of Dynamic JVM Languages (PDF). VMIL ’13. Indianapolis, Indiana, USA. Retrieved 25 March 2017.
  22. Bradford L. Chamberlain; Ben Albrecht; Lydia Duncan; Ben Harshbarger (2017). Entering the Fray: Chapel's Computer Language Benchmark Game Entry (PDF). Retrieved 25 March 2017.