Revision as of 05:55, 22 May 2006 edit-Barry- (talk | contribs)1,472 edits →Perl: Would be better if the group of tables below was centered. Don't know how.← Previous edit | Revision as of 12:10, 22 May 2006 edit undo-Barry- (talk | contribs)1,472 edits →[]: Better link and wording.Next edit → | ||
Line 334: | Line 334: | ||
] are designed to mimic a particular type of workload on a component or system. The computer programs used for compiling some of the benchmark data in this section may not have been fully optimized, and the relevance of the data is disputed. The most accurate benchmarks are those that are customized to your particular situation. Other people's benchmark data may have some value to others, but proper interpretation brings many ]. See page about flawed benchmarks and comparisons. | ] are designed to mimic a particular type of workload on a component or system. The computer programs used for compiling some of the benchmark data in this section may not have been fully optimized, and the relevance of the data is disputed. The most accurate benchmarks are those that are customized to your particular situation. Other people's benchmark data may have some value to others, but proper interpretation brings many ]. See page about flawed benchmarks and comparisons. | ||
===]=== | ===]=== | ||
The module Benchmark.pm comes with Perl. One opinion of it comes from a used in a 2006 talk by ] editor ] that says it "sux." Other for Perl exist on ]. They typically rely on Benchmark.pm. | |||
The following data comes from benchmarks from from May 7, 2006 and benchmarks from May 10, 2006. The Debian and Gentoo tests used equivalent benchmarks, but on Gentoo, some benchmarks had a higher workload, most language implementations were built from source, and <i>Size</i> tests measured GZip bytes instead of lines of code. | The following data comes from benchmarks from from May 7, 2006 and benchmarks from May 10, 2006. The Debian and Gentoo tests used equivalent benchmarks, but on Gentoo, some benchmarks had a higher workload, most language implementations were built from source, and <i>Size</i> tests measured GZip bytes instead of lines of code. |
Revision as of 12:10, 22 May 2006
Programming languages are used for controlling the behavior of a machine (often a computer). Like human languages programming languages have syntactic and semantic rules used to define meaning.
There are thousands of programming languages and new ones are created every year. (see list of programming languages). Few languages ever become sufficiently popular that they are used by more than a few people, but many professional programmers use dozens of different languages during their career.
General comparison
The following table compares general and technical information for a selection of programming languages. See the individual languages' articles for further information.
- From the first column of the May, 2006 TIOBE Programming Community Index. Languages are ranked sequentially from most to fewest search engine results using the method described on TIOBE's Definition page:
- The ratings are calculated by counting hits of the most popular search engines. The search query that is used is
- +"<language> programming" -tv -channel
- The search query is executed for the regular Google, MSN, and Yahoo! web search and the Google newsgroups for the last 12 months. The web site Alexa.com has been used to determine the most popular search engines. The word "tv" and "channel" have been filtered out here to avoid any interference with TV programs. Otherwise languages such as ABC and Scheme would have been highly overrated.
- By applying the search engine query as defined above, a lot of hit counts are collected. Let's define "hits(PL#i,SE)" as the number of hits of programming language PL at position i of the TPC index for search engine SE. The counted hits are normalized for each search engine for the first 50 languages. More formally, the rating for PL#i becomes
- ((hits(PL#i,SE1)/hits(PL#1) + ... + hits(PL#50)) + ... + (hits(PL#i,SEn)/hits(PL#1) + ... + hits(PL#50)))/n
- From the Delta in Position column of the May, 2006 TIOBE Programming Community Index. This number indicates the language's change in SERP rank (see above footnote) over the last year. In determining the SERP rank change for a language, the language may include or exclude certain dialects or other languages. See what's included or excluded in the Exceptions and inclusions chart below.
Language | Exceptions/Inclusions |
---|---|
Awk | Included: awk, gawk, mawk, nawk |
C# | Included: C#, C-Sharp, C Sharp |
ColdFusion | Included: ColdFusion, Cold Fusion, CFMX, CFML |
D | Exception: "3-D Programming" |
Delphi/Kylix | Included: Delphi, Kylix |
IDL | Exception: "corba" |
Lisp/Scheme | Included: Lisp, Scheme |
Python | Included: Python, Jython, IronPython (Jan Persson) |
T-SQL | Included: T-SQL, Transact-SQL |
Tcl/Tk | Included: Tcl/Tk, Tcl, Tk |
VB.NET | Included: VB.NET, Visual Basic.NET, Visual Basic .NET, Visual Basic 2005, VB 2005 |
Visual FoxPro | Included: FoxPro, Fox Pro, VFP |
Expressiveness
Language | Statements ratio |
Lines ratio |
---|---|---|
C++ | 2.5 | 1 |
Fortran | 2 | .8 |
Java | 2.5 | 1.5 |
Perl | 6 | 6 |
Python | 6 | 6.5 |
Smalltalk | 6 | .625 |
MS Visual Basic | 4.5 | ? |
The literature on programming languages contains an abundance of informal claims about their relative expressive power, but there's no framework for formalizing such statements nor for deriving interesting consequences. This chart provides two measures of expressiveness from two different sources. An additional measure of expressiveness, in GZip bytes, can be found with the Compare to tool on the Gentoo : Intel® Pentium® 4 page of http://shootout.alioth.debian.org.
1. Data from Code Complete. The Statements ratio column "shows typical ratios of source statements in several high-level languages to the equivalent code in C. A higher ratio means that each line of code in the language listed accomplishes more than does each line of code in C."
2. The ratio of line count tests won by each language to the number won by C when using the Compare to feature at http://shootout.alioth.debian.org/debian/c.php. Last updated May, 2006. C gcc was used for C, C++ g++ was used for C++, Fortran G95 was used for Fortran, Java JDK Server was used for Java, and Smalltalk GST was used for Smalltalk.
3. From On the Expressive Power of Programming Languages, Matthias Felleisen, ESOP '90 3rd European Symposium on Programming.
Benchmarks
Benchmarks are designed to mimic a particular type of workload on a component or system. The computer programs used for compiling some of the benchmark data in this section may not have been fully optimized, and the relevance of the data is disputed. The most accurate benchmarks are those that are customized to your particular situation. Other people's benchmark data may have some value to others, but proper interpretation brings many challenges. See this page about flawed benchmarks and comparisons.
Perl
The module Benchmark.pm comes with Perl. One opinion of it comes from a slide used in a 2006 talk by Perl Review editor Brian D Foy that says it "sux." Other benchmark modules for Perl exist on CPAN. They typically rely on Benchmark.pm.
The following data comes from Debian : AMD™ Sempron™ benchmarks from from May 7, 2006 and Gentoo : Intel® Pentium® 4 benchmarks from May 10, 2006. The Debian and Gentoo tests used equivalent benchmarks, but on Gentoo, some benchmarks had a higher workload, most language implementations were built from source, and Size tests measured GZip bytes instead of lines of code.
Number of tests won (Debian : AMD™ Sempron™ / Gentoo : Intel® Pentium® 4)
Speed |
Memory |
Size |
Perl | C (gcc) |
---|---|
1/1 | 12/15 |
0/1 | 13/15 |
11/14 | 2/2 |
Perl | C++ (g++) |
---|---|
0/2 | 14/12 |
0/0 | 14/14 |
10/14 | 4/0 |
Perl | Java JDK Server |
---|---|
3/3 | 13/13 |
12/12 | 4/4 |
13/16 | 2/0 |
Perl | PHP |
---|---|
9/8 | 4/6 |
10/10 | 3/5 |
10/11 | 3/4 |
Perl | Python |
---|---|
5/7 | 11/9 |
8/8 | 8/8 |
6/3 | 9/13 |
Perl | Ruby |
---|---|
14/14 | 2/2 |
10/9 | 6/7 |
8/2 | 6/14 |
See also
- Misplaced Pages's Programming languages category — links to articles on general-purpose programming languages and to related categories.
External Links
- Programming Language Comparison — A comparison of nine programming languages and related information.
- Computer Language Shootout Scorecard — Comparison of benchmark results for dozens of languages.
- Scriptometer scores — Multiple comparisons of 26 programming languages.
- Are Scripting Languages Any Good? A Validation of Perl, Python, Rexx, and Tcl against C, C++, and Java — 2003 study
- An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl — March 2000 refereed journal paper
- An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl for a search/string-processing program — March 2000 technical report
- Comparing Web Languages in Theory and Practice — Research to fulfill Kristofer J. Carlson's master's degree requirements.
- The Encyclopedia of Computer Languages — As of May 2006, the encyclopedia lists 8512 computer languages with 17837 bibliographic records featuring 11064 extracts.
This programming-language-related article is a stub. You can help Misplaced Pages by expanding it. |