A proper language comparison...

qznc qznc at web.de
Thu Jul 25 12:50:42 PDT 2013


On Thursday, 25 July 2013 at 18:23:19 UTC, Xinok wrote:
> Once in a while, a thread pops up in the newsgroups pitting D 
> against some other language. More often than not, these 
> comparisons are flawed, non-encompassing, and uninformative. 
> Most recently with the article comparing D with Go and Rust, 
> the community pointed out a few flaws involving a late addition 
> of one of the D compilers, build configurations 
> (-noboundscheck?), and the random number generator used.
>
> Then when I think about how web browsers are compared, there 
> are conventional measures and standard benchmarking tools (e.g. 
> sunspider). They measure performance for javascript, rendering, 
> HTML5, etc. They also measure startup times (hot/cold boot), 
> memory usage, etc. Finally, there are feature comparisons, such 
> as what HTML5 features each browser supports.
>
> These are the type of comparisons I'd like to see with 
> programming languages. For starters, there should be standard 
> "challenges" (algorithms and such) implemented in each language 
> designed to measure various aspects of the language, such as 
> sorting, number crunching, and string processing. However, 
> rather than leave it to a single individual to implement the 
> algorithm in several different languages, it should be left to 
> the community to collaborate and produce an "ideal" 
> implementation of the algorithm in their language. We could 
> analyze factors other than performance, such as the ease of 
> implementation (how many lines? does it use safe/unsafe 
> features? Was it optimized using unsafe / difficult features?).

Sounds very much like this: 
http://benchmarksgame.alioth.debian.org/

You can compare code size, memory need, execution time for 
various programs and lots of languages. Safety is not considered 
though, but how would you measure that?

It is called a "game", because you can adapt the weights until 
your favorite language is the winner. ;)

D entries were provided, but removed at some point, because it 
looked like the C code.


More information about the Digitalmars-d mailing list