1brc icon indicating copy to clipboard operation
1brc copied to clipboard

Optimize my solution

Open yavuztas opened this issue 1 year ago • 4 comments

Optimize my solution:

  • Eliminate redundant object creations in between
  • Custom HashMap on purpose - Inspired by @spullara
  • More performant temperature parsing - Inspired by @yemreinci
  • JVM tweaks, decreased heap memory, and remove AlwaysPreTouch

Check List:

  • [x] Tests pass (./test.sh <username> shows no differences between expected and actual outputs)
  • [x] All formatting changes by the build are committed
  • [x] Your launch script is named calculate_average_<username>.sh (make sure to match casing of your GH user name) and is executable
  • [x] Output matches that of calculate_average_baseline.sh
  • Execution time: ~3s
  • Execution time of reference implementation: ~3m22

yavuztas avatar Jan 08 '24 10:01 yavuztas

Hi @gunnarmorling

I can't hold myself to optimize more :) And also a lot of learning of course!

Could you please have a look?

Many thanks.

yavuztas avatar Jan 08 '24 11:01 yavuztas

Hi, I found a problem with this solution right now. The output is not stable (sometimes correct but sometimes not) because the equals method is wrong. Do not evaluate it right now. I will try to fix it first. FYI @gunnarmorling

yavuztas avatar Jan 09 '24 05:01 yavuztas

Ok, converted into draft until I fix the bug

yavuztas avatar Jan 09 '24 05:01 yavuztas

The bug is fixed, and ready for evaluation again.

yavuztas avatar Jan 09 '24 05:01 yavuztas

Hey, could you please rebase this to latest main and squash everything into one commit? Thx.

gunnarmorling avatar Jan 11 '24 21:01 gunnarmorling