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

MahmoudFawzyKhalil's implementation #438

Merged

Conversation

MahmoudFawzyKhalil
Copy link
Contributor

Check List:

  • 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)

Apple M1 Macbook Pro, 8 Cores, 16GB RAM

  • Execution time: 32.02s
  • Execution time of reference implementation: 3.29m

@gunnarmorling
Copy link
Owner

This fails a test:

Validating calculate_average_MahmoudFawzyKhalil.sh -- src/test/resources/samples/measurements-rounding.txt
1c1
< ham;14.6;25.4;33.6
---
> ham;14.6;25.5;33.6

Also note that new entries should run in 10 sec or less on the eval machine, so as to keep things manageable with the large number of entries. As you state 32 above for yours on your machine, what's your time for the current #1 for comparison? It's not a hard and fast rule, but it should be somewhere there.

@MahmoudFawzyKhalil
Copy link
Contributor Author

I pushed a commit to fix the rounding error that caused the failing test.

The fastest solution takes ~1 second on my machine 🤯.

Thank you for this awesome challenge. It is a great opportunity to learn something new.

@gunnarmorling
Copy link
Owner

Ok, tests pass now. Note that new entries should at this point should complete in 10 sec or less, as per the README and the PR template. This one comes in at 00:35.875. You've put in the effort already, so I'm still gonna merge it, but any follow-ups should be somewhere up there. Thx for participating!

@gunnarmorling gunnarmorling merged commit 0854152 into gunnarmorling:main Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants