-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go implementation by AlexanderYastrebov #298
Go implementation by AlexanderYastrebov #298
Conversation
cd8669d
to
e4c37af
Compare
Ah, very interesting. I'll get back to this eventually, for now I'm gonna focus on the backlog of Java entries, as per the guidelines of the original challenge. |
790c683
to
2e26992
Compare
Very nice solution and great runtime! |
Finally getting back to this. Great job, everything works flawlessly. I didn't want to install Docker on the official eval machine, so I ran on the previously used CCX33 instance. Here's the comparison to
You wanna do any more changes to this PR or is it good to be merged? |
Are going to build his solution in the new machine outside Docker? Maybe compiling in the machine this is going to run would be better than compiling in Docker, for performance @AlexanderYastrebov ? go compilation is incredibly fast. |
2e26992
to
44bb4b4
Compare
It can be merged. I hope it won't stand in the way due to missing Docker. The main value here is to unlock non-java submissions to the challenge. I also would like to thank you for organizing 1brc, it was fun and I learned a lot 👍 and also brushed up my java which I did not touch since couple of years. |
@AlexanderYastrebov your go solution assume no collision in the hash function, right? Or are you handling collisions? // use uint64 FNV-1a hash of id value as buckets key and keep mapping to the id value. I think that's why it's so fast for the 10k. But it seems this is not allowed for this challenge: |
@tivrfoa I have a version with collision detection https://github.com/AlexanderYastrebov/1brc/tree/AlexanderYastrebov-go-collision-free which of course is slower :) |
Ah yeah, for merging it, it must handle collisions (maybe it's time to set
up some tests with randomized data, so as to increase odds a bit to capture
this at least in some cases).
… Message ID: ***@***.***>
|
I've updated the PR |
88262f4
to
0cb23cb
Compare
This is a proof-of-concept to demonstrate non-java submission. It requires Docker with BuildKit plugin to build and export binary. Updates * gunnarmorling#67 * gunnarmorling#253
0cb23cb
to
503a48a
Compare
Very cool, also passing the tests on CI (set this up earlier this week). Gonna merge it, but not adding it to the leaderboard, given it's a non-Java solution and as such not within the rules. But it's a very nice example for doing this in a portable way, which for instance may be useful for future challenges. Thanks a lot for creating it!
Thanks, really appreciate it! Also thank you for all your work around tests and more! |
Ah, if you wanted to add something to the README for likeminded folks interested in creating non-Java solutions and running them in an easy-to-compare way as you've explored it here, that'd be welcome, too. Thx! |
Oh, they'll figure it out, I'm sure :) Thanks! |
This is a proof-of-concept to demonstrate non-java submission.
It requires Docker with BuildKit plugin to build and export binary.
Updates
Check List:
./test.sh <username>
shows no differences between expected and actual outputs)calculate_average_<username>.sh
(make sure to match casing of your GH user name) and is executablecalculate_average_baseline.sh