Skip to content
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

CalculateAverage_stephenvonworley submission #677

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

stephenvonworley
Copy link
Contributor

@stephenvonworley stephenvonworley commented Jan 31, 2024

Hello, I'd like to make a new submission for the 1BRC! The class name is:
CalculateAverage_stephenvonworley

prepare_stephenvonworley.sh uses Graal's native-image to generate a precompiled binary named CalculateAverage_stephenvonworley_image.

This solution is an optimized scalar parser, which combines most of the best ideas so far, plus some improvements of my own.

My code checks for hash collisions at lines 298, 318, and 323.

On 8 cores of a Xeon 2650 v3, the elapsed time is 2.18 seconds. Should run faster on your setup.

Thanks for putting this together, Gunnar! It must be a lot of work, I appreciate it.

Check List:

  • You have run ./mvnw verify and the project builds successfully
  • Tests pass (./test.sh <username> shows no differences between expected and actual outputs)
  • All formatting changes by the build are committed
  • Your launch script is named calculate_average_<username>.sh (make sure to match casing of your GH user name) and is executable
  • Output matches that of calculate_average_baseline.sh
  • For new entries, or after substantial changes: When implementing custom hash structures, please point to where you deal with hash collisions (line number)
  • Execution time: 2.18s (on 8 cores of my personal system)
  • Execution time of reference implementation: 256s

@gunnarmorling
Copy link
Owner

00:02.018.

@gunnarmorling gunnarmorling merged commit a533019 into gunnarmorling:main Jan 31, 2024
1 check passed
@gunnarmorling
Copy link
Owner

Hey @stephenvonworley!

Congrats again on being in the Top 20 of the One Billion Row Challenge!

To celebrate this amazing achievement, I would like to send you a 1BRC t-shirt and coffee mug. To claim your prize, fill out this form by Feb 18. After submitting the form, please provide a comment with the random value you've specified in the form, so that I know it is you who submitted it.

All data entered will solely be used in relation to processing this shipment. Shipments can be sent to any country listed here or here (I'll use whichever one is cheaper for me to ship to your location). A big thank you to Decodable for sponsoring these prizes!

Thanks a lot for participating in 1BRC,

--Gunnar

@stephenvonworley
Copy link
Contributor Author

Hey @stephenvonworley!

Congrats again on being in the Top 20 of the One Billion Row Challenge!

To celebrate this amazing achievement, I would like to send you a 1BRC t-shirt and coffee mug. To claim your prize, fill out this form by Feb 18. After submitting the form, please provide a comment with the random value you've specified in the form, so that I know it is you who submitted it.

All data entered will solely be used in relation to processing this shipment. Shipments can be sent to any country listed here or here (I'll use whichever one is cheaper for me to ship to your location). A big thank you to Decodable for sponsoring these prizes!

Thanks a lot for participating in 1BRC,

--Gunnar

Hi @gunnarmorling. Thanks a bunch for putting together the 1BRC, it was a lot of fun!

I never got the chance to optimize my inner loop: based on the solutions and some post-challenge experiments, I'm pretty sure there's a scalar Java implementation that runs in about 1.0 seconds on your 8 core test rig. I might code it up some time, just to find out...

Speaking of which, various people have had the idea of maintaining some solutions (scalar/vector, Unsafe/safe, etc) to which improvements could be submitted in ongoing fashion. If something like that ever happens, I'd be willing to pitch in to help manage it...

Once again, thanks!
Steve
11444 28931

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants