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

A solution to the One Billion Row Challenge (1brc.dev) written in dgsh would be a interesting as a benchmark.


Nice benchmark! This is a (not at all efficient) awk one-liner.

awk -F\; ' $2 > max[$1] { max[$1] = $2 } !($1 in min) || $2 < min[$1] { min[$1] = $2 } { sum[$1] += $2; count[$1]++} END { for (n in sum) printf("%s=%.1f/%.1f/%.1f, ", n, min[n], sum[n] / count[n], max[n])}'

Can't see how dgsh could be applied to it.




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

Search: