Two thoughts. One is that Iâm slightly disappointed that the list in Wikipedia does not (AFAIK) include the sample âHello, Worldâ program that Petzold published in his first Windows programming book. That was a real eye-opener for a lot of people who got from that a sense of what programming that new-fangledâ GUI was going to be all about.
The other thought is that the page is in some senses a matrix that compares the algorithmic granularity of assembly languages (all those steps!) versus the comparatively minimal effort of a simple C statement versus the scaffolding required in an OOP-based approach. That is, itâs a (very) rough gauge of the high-levelness of languages.
Anyway, very interesting. We can be sure that as new programming languages are invented, it will always be âHello, Worldâ that will be the first program illustrated in the book.
I wouldnât say completely useless. It gives you an indication of how elegant a language is (Number of lines) and how expensive its environment/framework is (mem and cpu time).
Jeff, Iâd like to know why you think this test is âcompletely uselessâ. Or did I miss the sarcasm?
Displaying output on a computer screen is a pretty basic function of many programs, and it would seem this test measures the performance of doing that.
Iâd also be interested in another benchmark: how long it takes to code âhello worldâ in each language
The point of this particular benchmark is to measure the load/initialization cost. The assumption is that the actual âHello, World!â cost is negligible, so the test is actually measuring startup costs. Iâm not entirely sure, but I think the Shootout folks even subtract this benchmark from their other tests to control for language startup costs.
Startup time can be critical for some applications. In most GUIs, the startup time is a large factor in how fast the user perceives the application to be. In shell scripting, itâs usually the dominant cost - one reason why Java is completely unsuitable as a scripting language.
it would seem this test measures the performance of doing that
Iâm sure the CEO of Hello, World! Incorporated will be riveted by these benchmark results.
You have to benchmark things that people actually use. This is a common criticism of video card reviews. How many 3D Mark 2006 units a video card scores is irrelevant. It doesnât help me understand whether the card will be fast in the games I actually play. Will it play Battlefield 2 at 1600 x 1200 with 4x antialiasing at a sustained 60fps in my multiplayer games?
amusing but useless. people may look at this and say âoh boy, stay away from erlangâ, except erlang is starting up a runtime that provides for more efficient concurrency than any of the other tools.
Objective Caml: A high-level functional programming language with: (1) a powerful type system, equipped with parametric polymorphism and type inference; (2) user-definable algebraic data types and pattern matching; (3) and automatic memory management.
And itâs freakinâ fourth!
Guess they werenât kidding about (4) efficient native code compilers.
Ole: The test is completely useless as benchmark because Hello World is so small that you have the load/initilization cost and the actual âHello, World!â costs mixed together. Unless youâre actually trying to make the fastest Hello World program for some reason, itâs useful only for humorâs sake. On real tasks this initilization time gets amortized over the life of the program.
"a completely useless performance test"
Perhaps you donât understand what itâs being used for?
The Computer Language Shootout FAQ a href="http://shootout.alioth.debian.org/âhttp://shootout.alioth.debian.org//a
"Each program was run as a child-process of a Perl script. We take the script child-process usr+sys time, before forking the child-process and after the child-process exits⌠The Full CPU time includes program startup time.â
The hello world programs are included to provide some idea about startup costs.