Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very cool, and definitely gives me some insight into those benchmarks. Which makes me wonder -- are there benchmarks for "boring" programs in a variety of languages? I'm generally more interested in the execution speed of implementations that I would actually have time to write when on a deadline.


The best thing for your purposes would be a site that attempted to optimize for the appearance of idiomatic code, which you could then secretly use to gauge the performance of code that's idiomatic to each language. In other words, entirely remove performance showboating as an incentive. Rosetta Code (http://rosettacode.org/wiki/Rosetta_Code) may be the closest to what you want, though I can guess that most of the Rust implementations were written prior to 1.0 and won't even compile anymore, let alone represent idiomatic code. :P


I like that idea -- although I would agree that Rosetta Code often does not represent idiomatic code, even for longer-established languages. The wikibooks algorithms book might also be a good candidate, although I've not yet seen Rust on there.


Many languages have a few programs for each benchmark. You can try looking at the shortest one.

Most submitters try to optimize for speed, and to use smart tricks you need more LOC, so usually the shortest program is the more straightforward.

Actually, in this site they don't measure the size of a program in LOC, they use the size of the compressed program that is a better metric.

(It may be different in other sites specialized in code golf, because in the those sites the submitters are specializing for size specifically.)


As you can see here, code amount is also measured: http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...


If only you'd look at the code, you might get some insight.

You might see some boring programs.

You could always contribute some boring programs ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: