Leaderboard, formatting

This commit is contained in:
Gunnar Morling 2024-01-11 10:47:47 +01:00
parent 780ab9af3e
commit b0c9952c08
6 changed files with 27 additions and 27 deletions

View File

@ -80,7 +80,7 @@ These are the results from running all entries into the challenge on eight cores
| | 00:17.490 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_kgeri.java)| 21.0.1-open | [Gergely Kiss](https://github.com/kgeri) | | | | 00:17.490 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_kgeri.java)| 21.0.1-open | [Gergely Kiss](https://github.com/kgeri) | |
| | 00:18.251 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_seijikun.java)| 21.0.1-graal | [Markus Ebner](https://github.com/seijikun) | | | | 00:18.251 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_seijikun.java)| 21.0.1-graal | [Markus Ebner](https://github.com/seijikun) | |
| | 00:18.448 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_moysesb.java)| 21.0.1-open | [Moysés Borges Furtado](https://github.com/moysesb) | | | | 00:18.448 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_moysesb.java)| 21.0.1-open | [Moysés Borges Furtado](https://github.com/moysesb) | |
| | 00:18.583 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_davecom.java)| 21.0.1-open | [David Kopec](https://github.com/davecom) | | | | 00:18.771 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_davecom.java)| 21.0.1-graal | [David Kopec](https://github.com/davecom) | |
| | 00:19.357 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_truelive.java)| 21.0.1-graalce | [Roman Schweitzer](https://github.com/truelive) | | | | 00:19.357 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_truelive.java)| 21.0.1-graalce | [Roman Schweitzer](https://github.com/truelive) | |
| | 00:21.989 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_couragelee.java)| 21.0.1-open | [couragelee](https://github.com/couragelee) | | | | 00:21.989 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_couragelee.java)| 21.0.1-open | [couragelee](https://github.com/couragelee) | |
| | 00:22.457 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_rby.java)| 21.0.1-open | [Ramzi Ben Yahya](https://github.com/rby) | | | | 00:22.457 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_rby.java)| 21.0.1-open | [Ramzi Ben Yahya](https://github.com/rby) | |

View File

@ -20,4 +20,4 @@
# sdk use java 21.0.1-graal 1>&2 # sdk use java 21.0.1-graal 1>&2
JAVA_OPTS="" JAVA_OPTS=""
time java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_alesj java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_alesj

View File

@ -17,4 +17,4 @@
JAVA_OPTS="" JAVA_OPTS=""
time java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_charlibot java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_charlibot

View File

@ -18,4 +18,4 @@
JAVA_OPTS="-Xms6G -Xmx16G" JAVA_OPTS="-Xms6G -Xmx16G"
time java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_kumarsaurav123 java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_kumarsaurav123

0
prepare_davecom.sh Normal file → Executable file
View File

View File

@ -146,8 +146,7 @@ public class CalculateAverage_kumarsaurav123 {
byte[] s2 = new byte[i - st]; byte[] s2 = new byte[i - st];
System.arraycopy(allBytes2, st, s2, 0, s2.length); System.arraycopy(allBytes2, st, s2, 0, s2.length);
if (cnt != 0) { if (cnt != 0) {
for(int j=0;j<s2.length;j++) for (int j = 0; j < s2.length; j++) {
{
if (s2[j] == sep[0]) { if (s2[j] == sep[0]) {
byte[] city = new byte[j]; byte[] city = new byte[j];
byte[] value = new byte[s2.length - j - 1]; byte[] value = new byte[s2.length - j - 1];
@ -160,7 +159,8 @@ public class CalculateAverage_kumarsaurav123 {
d = d * -1; d = d * -1;
} }
else if (value[k] == 46) { else if (value[k] == 46) {
} else { }
else {
d = d + map.get(value[k]).intValue() * Math.pow(10, s); d = d + map.get(value[k]).intValue() * Math.pow(10, s);
s++; s++;
} }