Live data from Hacker News

New Computer Language Benchmarks Game metric: time + source code size

benchmarksgame-team.pages.debian.net

31–40 of 59 posts

Re: New Computer Language Benchmarks Game metric: time + source code size

#31
post #4

For comparing multiple implementations of a single benchmark in a single language, this sort of data would be interesting as a 2D plot, to see how many lines it takes to improve performance by how much. But for cross-language benchmarking this seems somewhat confounding, as the richness of standard libraries varies between languages (and counting the lines of external dependencies sounds extremely annoying, not only…

I'm not sure I see the problem. What does it matter that program A is shorter than program B because language A has a richer standard library? Program A still required less code.

Because that's not what's being measured here, you're also mixing in performance, and it's impossible to tell at a glance whether a score is attributable to one or the other or both.

Re: New Computer Language Benchmarks Game metric: time + source code size

#32
post #8

Geometric mean of (time + gzipped source code size in bytes) seems statistically wrong. What if you shifted time to nanoseconds ? Or source code size in terms of Megabytes. The rankings could change. The culprit is the '+' I would think Geometric mean of (time x gzipped source code size) is the correct way to compare languages together. It would not matter what the units of time or size are in that case. [Here the ge…

Yep this is correct. Adding disparate units is almost always nonsensical. You can confirm with a scientific calculator like insect: $ insect '5s + 10MB' Conversion error: Cannot convert unit MB (base units: bit) to unit s $ insect '5s * 10MB' 50 s·MB

units, frink, insect oh my

Re: New Computer Language Benchmarks Game metric: time + source code size

#33

Geometric mean of (time + gzipped source code size in bytes) seems statistically wrong. What if you shifted time to nanoseconds ? Or source code size in terms of Megabytes. The rankings could change. The culprit is the '+' I would think Geometric mean of (time x gzipped source code size) is the correct way to compare languages together. It would not matter what the units of time or size are in that case. [Here the ge…

It's not necessarily wrong to add disparate units like this. It's implicitly weighting one unit to the other. Changing to nanoseconds just gives more weight to the time metric in the unified benchmark. You could instead explicitly weight them without changing units, if you cared about the size more you could add a multiplier to it.

You really don’t know what weight is the right weight to balance time and gripped size. Multiplying them together sidesteps the whole issue and puts time and size on par with each other regardless of the individual unit scaling.

The whole point of benchmarks is to protect against accidental bias in your calculations. Adding them seems totally against my intuition. If you did want to give time more weight then I would raise it to some power. Example: geometric mean of (time x time x source size) would give time much more importance in an arguably more principled way.

Re: New Computer Language Benchmarks Game metric: time + source code size

#34
post #19

Geometric mean of (time + gzipped source code size in bytes) seems statistically wrong. What if you shifted time to nanoseconds ? Or source code size in terms of Megabytes. The rankings could change. The culprit is the '+' I would think Geometric mean of (time x gzipped source code size) is the correct way to compare languages together. It would not matter what the units of time or size are in that case. [Here the ge…

> The culprit is the '+' That annotation does seem to have caused much frothing and gnashing. Here's how the calculation is made — "How not to lie with statistics: The correct way to summarize benchmark results." [pdf] http://www.cse.unsw.edu.au/~cs9242/11/papers/Fleming_Wallace...

That paper is only about the reasoning behind taking the geometric mean, it doesn't have anything to say on the "time + gzipped source code size in bytes" part.

Re: New Computer Language Benchmarks Game metric: time + source code size

#35

Earlier quoted context omitted.

It's not necessarily wrong to add disparate units like this. It's implicitly weighting one unit to the other. Changing to nanoseconds just gives more weight to the time metric in the unified benchmark. You could instead explicitly weight them without changing units, if you cared about the size more you could add a multiplier to it.

You really don’t know what weight is the right weight to balance time and gripped size. Multiplying them together sidesteps the whole issue and puts time and size on par with each other regardless of the individual unit scaling. The whole point of benchmarks is to protect against accidental bias in your calculations. Adding them seems totally against my intuition. If you did want to give time more weight then I would…

> Adding them…

Read '+' as '&'.

Re: New Computer Language Benchmarks Game metric: time + source code size

#36
post #21

I dont buy these results at all. Julia at second place looks like plain lie and complete nonsense, to the point I'm gonna look into this and run it myself. After trying hard to use julia for about a year and I came to conclusion it's one of the slowest things around. Maybe the stuff changed? Maybe, but julia code still remains incorrect. I hope they fix both things, speed (including start up speed, it counts A LOT) a…

Note that these benchmarks include compilation time for Julia, while it does not include compilation time for C, Rust, etc.

Re: New Computer Language Benchmarks Game metric: time + source code size

#37

Earlier quoted context omitted.

It's not necessarily wrong to add disparate units like this. It's implicitly weighting one unit to the other. Changing to nanoseconds just gives more weight to the time metric in the unified benchmark. You could instead explicitly weight them without changing units, if you cared about the size more you could add a multiplier to it.

You really don’t know what weight is the right weight to balance time and gripped size. Multiplying them together sidesteps the whole issue and puts time and size on par with each other regardless of the individual unit scaling. The whole point of benchmarks is to protect against accidental bias in your calculations. Adding them seems totally against my intuition. If you did want to give time more weight then I would…

Multiplying them is another way of expressing them as a unified value. It's not a question of accidental bias, you're explicitly choosing how important one second is compared to one byte.

You could imagine there's a 1 sec/byte multiplier on the bytes value, saying in effect "for every byte of gzipped source, penalise the benchmark by one second".

Re: New Computer Language Benchmarks Game metric: time + source code size

#38
post #26

Earlier quoted context omitted.

All of the languages now have that trash in them. I'd like a "naive" benchmarks game where you write the code straight forwardly in a normal style for the language.

"simple" (2nd link on the homepage.) https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

>Java: 40 seconds

>Python 3: 1h 09 minutes

Well damn.

Re: New Computer Language Benchmarks Game metric: time + source code size

#39

Earlier quoted context omitted.

You really don’t know what weight is the right weight to balance time and gripped size. Multiplying them together sidesteps the whole issue and puts time and size on par with each other regardless of the individual unit scaling. The whole point of benchmarks is to protect against accidental bias in your calculations. Adding them seems totally against my intuition. If you did want to give time more weight then I would…

Multiplying them is another way of expressing them as a unified value. It's not a question of accidental bias, you're explicitly choosing how important one second is compared to one byte. You could imagine there's a 1 sec/byte multiplier on the bytes value, saying in effect "for every byte of gzipped source, penalise the benchmark by one second".

> You could imagine there's a 1 sec/byte multiplier on the bytes value, saying in effect "for every byte of gzipped source, penalise the benchmark by one second".

Your explanation makes sense. However the main issue is we don’t know if this “penalty” is fair or correct or has some justifiable basis. In absence of any explanation it would make more sense to multiply them together as a “sane default”. Later, having done some research we can attach some weightage perhaps appealing to some physical laws or information theory. Even then I doubt that + would be the operator I would use to combine them.

Re: New Computer Language Benchmarks Game metric: time + source code size

#40
post #21

I dont buy these results at all. Julia at second place looks like plain lie and complete nonsense, to the point I'm gonna look into this and run it myself. After trying hard to use julia for about a year and I came to conclusion it's one of the slowest things around. Maybe the stuff changed? Maybe, but julia code still remains incorrect. I hope they fix both things, speed (including start up speed, it counts A LOT) a…

Note that these benchmarks include compilation time for Julia, while it does not include compilation time for C, Rust, etc.

Julia is presented like this —

“Julia features optional typing, multiple dispatch, and good performance, achieved using type inference and just-in-time (JIT) compilation, implemented using LLVM.”

Julia 1.7 Documentation, Introduction

https://docs.julialang.org/en/v1/

Post reply on HN