Update seijikun implementation

* Use Integer calculation instead of double, add unit-test

* Bring back StationIdent optimization

Originally, StationIdent was using byte[] to store names, so the extra
String allocation could be avoided. However, that produced incorrect
sorting.
Sorting is now moved to the result merging step. Here, names are
converted to Strings.

* Implement readStationName with SIMD 256bit

* Rebase and cleanup test code, now that it's in the project

* Fix seijikun formatting

* Fix test failure in specific jobCnt edge-cases

* Also switch to graalvm
This commit is contained in:
Markus Ebner
2024-01-05 19:35:15 +01:00
committed by GitHub
parent e3f6c3aaf7
commit 36dac255cf
2 changed files with 148 additions and 78 deletions

View File

@@ -15,6 +15,7 @@
# limitations under the License.
#
JAVA_OPTS="--enable-preview"
JAVA_OPTS="-XX:+UseParallelGC --enable-preview --add-modules jdk.incubator.vector"
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk use java 21.0.1-graal 1>&2
time java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_seijikun