Content deleted Content added
Franciscouzo (talk | contribs) |
Ops, the external link section was there already. |
||
(46 intermediate revisions by 30 users not shown) | |||
Line 1:
{{short description|Free software project}}
'''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]].
The project consists of:
* A set of very simple algorithmic problems (thirteen in total)<ref>{{Cite book |last1=Couto |first1=Marco |last2=Pereira |first2=Rui |last3=Ribeiro |first3=Francisco |last4=Rua |first4=Rui |last5=Saraiva |first5=João |chapter=Towards a Green Ranking for Programming Languages |date=2017-09-21 |title=Proceedings of the 21st Brazilian Symposium on Programming Languages |chapter-url=https://dl.acm.org/doi/abs/10.1145/3125374.3125382 |series=SBLP '17 |___location=New York, NY, USA |publisher=Association for Computing Machinery |pages=1–8 |doi=10.1145/3125374.3125382 |isbn=978-1-4503-5389-2|hdl=1822/65360 |hdl-access=free }}</ref>
* Various implementations to the above problems in various programming languages
* A set of unit tests to verify that the submitted implementations solve the problem statement
Line 8 ⟶ 10:
* A website to facilitate the interactive comparison of the results
==
{{Collapsible list
| title = List of supported languages
|[[Ada (programming language)|Ada]]
|[[C (programming_language)|C]]
|[[Chapel (programming language)|Chapel]]
| 5 = [[C Sharp (programming language)|C#]]
| 6 = [[C++]]
| 7 = [[Dart (programming language)|Dart]]
| 8 = [[Erlang (programming language)|Erlang]]
| 9 = [[F Sharp (programming language)|F#]]
| 10 = [[Fortran]]
| 11 = [[Go (programming language)|Go]]
| 12 = [[Haskell]]
| 13 = [[Java (programming language)|Java]]
| 14 = [[JavaScript]]
| 15 = [[Julia (programming language)|Julia]]
| 16 = [[Lisp (programming language)|Lisp]]
| 17 = [[Lua (programming language)|Lua]]
| 18 = [[OCaml]]
| 19 = [[Pascal (programming language)|Pascal]]
| 20 = [[Perl]]
| 21 = [[PHP]]
| 22 = [[Python (programming language)|Python]]
| 23 = [[Racket (programming language)|Racket]]
| 24 = [[Ruby (programming language)|Ruby]]
| 26 = [[Rust (programming language)|Rust]]
| 28 = [[Smalltalk]]
| 29 = [[Swift (programming language)|Swift]]
}}
==
The following aspects of each given implementation are measured:<ref>{{cite web|url=https://benchmarksgame-team.pages.debian.net/benchmarksgame/how-programs-are-measured.html|title=How programs are measured – The Computer Language Benchmarks Game|website=benchmarksgame-team.pages.debian.net/benchmarksgame/|accessdate=29 May 2018}}</ref>
* overall user [[Run_time_(program_lifecycle_phase)|runtime]]
* peak [[memory allocation]]
* gzipped size of the solution's source code
* sum of total CPU time over all [[Thread (computing)|threads]]
* individual CPU [[Load (computing)|utilization]]
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.<ref>{{cite web|url=https://benchmarksgame-team.pages.debian.net/benchmarksgame/why-measure-toy-benchmark-programs.html|title=Why toy programs? – The Computer Language Benchmarks Game|website=benchmarksgame-team.pages.debian.net/benchmarksgame|accessdate=29 May 2018}}</ref>
This provides users of the Benchmark Game the opportunity to scrutinize the various implementations.<ref>{{cite web|url=https://benchmarksgame-team.pages.debian.net/benchmarksgame/description/nbody.html#nbody|title=n-body description (64-bit Ubuntu quad core) – Computer Language Benchmarks Game|website=benchmarksgame-team.pages.debian.net/benchmarksgame|accessdate=29 May 2018}}</ref>
* [[Memory management#Manual memory management|binary-trees]]
* [[Synchronization (computer science)#Thread or process synchronization|chameneos-redux]]
* [[Permutation|fannkuch-redux]]
Line 77 ⟶ 68:
* [[Context switch#Multitasking|thread-ring]]
==
The project was known as ''The Great Computer Language Shootout'' until 2007.<ref>{{cite web|url=https://benchmarksgame-team.pages.debian.net/benchmarksgame/sometimes-people-just-make-up-stuff.html#history|title=Trust, and verify – Computer Language Benchmarks Game|website=benchmarksgame-team.pages.debian.net/benchmarksgame|accessdate=29 May 2018}}</ref>
A port for Windows was maintained separately between 2002 and 2003.<ref>{{cite web|url=http://dada.perl.it/shootout/|title=The Great Win32 Computer Language Shootout|website=Dada.perl.it|accessdate=13 December 2017}}</ref>
The sources have been archived on GitLab.<ref>{{cite web|url=https://salsa.debian.org/benchmarksgame-team/archive-alioth-benchmarksgame|title=archive-alioth-benchmarksgame|website=salsa.debian.org/benchmarksgame-team|accessdate=29 May 2018}}</ref>
There are also older forks on GitHub.<ref>{{cite web|url=https://github.com/Byron/benchmarksgame-cvs-mirror|title=benchmarksgame-cvs-mirror: A git mirror of the benchmarksgame cvs repository|first=Sebastian|last=Thiel|date=24 October 2017|publisher=[[GitHub]]|accessdate=13 December 2017}}</ref>
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.<ref>{{cite web|url=https://benchmarksgame-team.pages.debian.net/benchmarksgame/play.html|title=Contribute your own program – Computer Language Benchmarks Game|website=benchmarksgame-team.pages.debian.net/benchmarksgame|accessdate=29 May 2018}}</ref>
==Caveats==
The developers themselves highlight the fact that those doing research should exercise caution when using such microbenchmarks:
{{quotation|[...] 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.<ref>
{{Cite journal |
author = Rajesh Karmani and Amin Shali and Gul Agha |
title = Actor frameworks for the JVM platform: A Comparative Analysis |
journal = In
year = 2009 |
url = http://osl.cs.illinois.edu/docs/pppj09/paper.pdf |
accessdate = 26 March 2017
}}</ref><ref>
==
* [[Benchmark (computing)]]
* [[Comparison of programming languages]]
==References==
{{Reflist}}
==External
* {{Official website}}
[[Category:Programming language comparisons
[[Category:Benchmarks (computing)]]
|