[Attempt #2] String overflow hash + data/mem optimization (#356)

* Use graal

* Use dynamic cores computer

* Use stream API to cleanup code

* Use max processors

* Use hash to avoid init string

* optimize concurrentmap init

* Smaller hash size

* Avoid checking concurrentmap

* Optimize data type

* string dedup

* Faster write

* Change base

* Remove time

* Use mul instead of div
This commit is contained in:
Bang NGUYEN
2024-01-13 12:32:17 +01:00
committed by GitHub
parent 45056e073b
commit dc49249d36
3 changed files with 83 additions and 77 deletions

View File

@@ -19,5 +19,5 @@
# source "$HOME/.sdkman/bin/sdkman-init.sh"
# sdk use java 21.0.1-graal 1>&2
JAVA_OPTS=""
time java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_gnabyl
JAVA_OPTS="-XX:+UseStringDeduplication"
java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_gnabyl