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

@jbachorik (reduce branches)

Open jbachorik opened this issue 1 year ago • 1 comments

An improvement over my initial submission. Still pure Java ByteBuffer implementation, no Unsafe nor Vector API nor FFI. I think the performance is competitive compared to the solutions using eg. Vector API but I will leave at your discretion to accept/run benchmarks.

And, again, thanks for many hours of fun :)

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: 00:05.883
  • Execution time of reference implementation: 02:36.457

jbachorik avatar Jan 13 '24 19:01 jbachorik

Happy to re-run it, that's what the challenge is for :) Could you just rebase it to current main and squash everything into a single commit? Thx!

gunnarmorling avatar Jan 13 '24 21:01 gunnarmorling

Will do!

jbachorik avatar Jan 14 '24 10:01 jbachorik

@gunnarmorling Ok. All done!

jbachorik avatar Jan 14 '24 11:01 jbachorik

00:06.654 now. Nice improvement!

gunnarmorling avatar Jan 14 '24 13:01 gunnarmorling