Skip to content

Comment on Hello World execution time

Comments

Ignorance and stupidity is running amok. This kind of trivial benchmark is not only incredibly dumb but is ACTIVELY HARMFUL to the programming community. Consider the conclusion drawn by author a few posts down in the thread

"Astonishing indeed. The whole thing confirmed my hunch that Bash, Chicken, and C provide a complete toolset to tackle 99.9% of programming needs."

No no no! Try running anything non-trival in bash or python and compare that to the java. Obviously if all you ever want to do with programming is write little boring scripts then you shouldn't be using a language like java in the first place. For anything mildly interesting and performance intensive Java is pretty much a no brainer only behind c/c++ amongst the major languages. For a site with REAL benchmarks which actually mean anything unlike the language fanboyism in this posted article checkout http://shootout.alioth.debian.org/u64q/which-programming-lan...

Well, back in the day... :-)

http://shootout.alioth.debian.org/gp4/benchmark.php?test=hel...

But "if all you ever want to do with programming is write little boring scripts" it might help to understand that 9 hundredths of a second delay is below the threshold that someone using the boring little script will notice.

And "if all you ever want to do with programming is write little boring scripts" simply using Java as an interpreter with -Xint might be faster.

For example, that old benchmarks game n=200 "hello world"

    Java 6 -Xint  15.429s
    Java 6 -client 16.929s
    Java 6 -server 17.073s
    Java 1.4 -server 35.738s

There is no need for hysteria; it depends on your use case. In the Unix shell, since every basic operation spawns a process, and performing such operations only takes a few milliseconds, startup time is extremely important. If it were written in Java, it would probably not be architected this way, but the startup time of C makes it acceptable to do so; it is an issue if commands written in languages like Perl and Python feel slower than the rest of the system.

>>In the Unix shell, since every basic operation spawns a process...<<

That does not seem to be the use case that's being examined.

The use case that's being examined is - "writing shell scripts / cron jobs / random commandline utilities".

"Random commandline utilities" sounds like exactly that; shell scripts use a lot of Unix commands, I don't know why cron jobs are mentioned.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.