Leaderboard, formatting
This commit is contained in:
parent
780ab9af3e
commit
b0c9952c08
@ -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) | |
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
0
prepare_davecom.sh
Normal file → Executable file
@ -62,17 +62,17 @@ public class CalculateAverage_kumarsaurav123 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
HashMap<Byte,Integer> map=new HashMap<>();
|
HashMap<Byte, Integer> map = new HashMap<>();
|
||||||
map.put((byte) 48,0);
|
map.put((byte) 48, 0);
|
||||||
map.put((byte) 49,1);
|
map.put((byte) 49, 1);
|
||||||
map.put((byte) 50,2);
|
map.put((byte) 50, 2);
|
||||||
map.put((byte) 51,3);
|
map.put((byte) 51, 3);
|
||||||
map.put((byte) 52,4);
|
map.put((byte) 52, 4);
|
||||||
map.put((byte) 53,5);
|
map.put((byte) 53, 5);
|
||||||
map.put((byte) 54,6);
|
map.put((byte) 54, 6);
|
||||||
map.put((byte) 55,7);
|
map.put((byte) 55, 7);
|
||||||
map.put((byte) 56,8);
|
map.put((byte) 56, 8);
|
||||||
map.put((byte) 57,9);
|
map.put((byte) 57, 9);
|
||||||
Collector<ResultRow, MeasurementAggregator, ResultRow> collector2 = Collector.of(
|
Collector<ResultRow, MeasurementAggregator, ResultRow> collector2 = Collector.of(
|
||||||
MeasurementAggregator::new,
|
MeasurementAggregator::new,
|
||||||
(a, m) -> {
|
(a, m) -> {
|
||||||
@ -146,26 +146,26 @@ 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];
|
||||||
System.arraycopy(s2, 0, city, 0, city.length);
|
System.arraycopy(s2, 0, city, 0, city.length);
|
||||||
System.arraycopy(s2, city.length+1, value,0, value.length);
|
System.arraycopy(s2, city.length + 1, value, 0, value.length);
|
||||||
double d=0.0;
|
double d = 0.0;
|
||||||
int s=-1;
|
int s = -1;
|
||||||
for(int k=value.length-1;k>=0;k--) {
|
for (int k = value.length - 1; k >= 0; k--) {
|
||||||
if (value[k] == 45) {
|
if (value[k] == 45) {
|
||||||
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++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mst.add(new Measurement(new String(city),d));
|
mst.add(new Measurement(new String(city), d));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ public class CalculateAverage_kumarsaurav123 {
|
|||||||
measurements.addAll(mst.stream()
|
measurements.addAll(mst.stream()
|
||||||
.collect(groupingBy(Measurement::station, collector))
|
.collect(groupingBy(Measurement::station, collector))
|
||||||
.values());
|
.values());
|
||||||
// System.out.println(measurements.size());
|
// System.out.println(measurements.size());
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
// throw new RuntimeException(e);
|
// throw new RuntimeException(e);
|
||||||
@ -251,6 +251,6 @@ public class CalculateAverage_kumarsaurav123 {
|
|||||||
// .collect(groupingBy(m -> m.station(), collector)));
|
// .collect(groupingBy(m -> m.station(), collector)));
|
||||||
|
|
||||||
System.out.println(measurements2);
|
System.out.println(measurements2);
|
||||||
// System.out.println(System.currentTimeMillis() - start);
|
// System.out.println(System.currentTimeMillis() - start);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user