1brc / 1brc.github.io

🌐 1brc.dev website for @1brc
https://1brc.dev
MIT License
7 stars 4 forks source link

Add BASH #17

Open alphafalfa opened 1 month ago

alphafalfa commented 1 month ago

I love programming in shell script! Am I good at it? No, but there are serious ninjas out there.

jcbhmr commented 1 month ago

great idea! youve been invited to the org; feel free to do whatever 👍

pc2005cz commented 1 month ago

So how is adding the bash category going? I've already an example, which (probably) works for 10M rows :-)

alphafalfa commented 1 month ago

I wrote a version in awk that was blazing fast for the first 10k rows, and then started going nuts and printing near gibberish.

pc2005cz commented 1 month ago

I wrote a version in awk

Ah OK I'm going for a pure bash implementation, but awk is interesting solution too. It could be two distinct categories. Are you loading entire file into some variable?

Gonna commit the solution tomorrow (I've forgot to roundup results at the end), also I'm not familiar with github and looking into C category repo it seems the bash category gonna need to be different (especially "running each program 5 times" would take too much time).

pc2005cz commented 4 weeks ago

My implementation of 1brc_bash. Running time 342 minutes :-D