Elliot Barlas: Use proper hash key collision detection scheme

* Use open-addressing scheme to deal with hash table collisions. Reduce concurrency from 16 to 8. Use bit mask rather than mod operator to confine hash code to table range.

* Properly handle file partitions that reside entirely within a line.

* Reorder statements in doProcessBuffer.
This commit is contained in:
Elliot Barlas
2024-01-04 12:06:19 -08:00
committed by GitHub
parent 0c59483985
commit a8bd6b58ce
2 changed files with 69 additions and 32 deletions

View File

@@ -17,4 +17,4 @@
sdk use java 21.0.1-graalce
JAVA_OPTS=""
time java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_ebarlas measurements.txt 16
time java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_ebarlas measurements.txt 8